fix bug popup แสดงซ้อน

This commit is contained in:
Warunee Tamkoo 2023-09-21 11:16:23 +07:00
parent 710a805177
commit dd7ba98e6e

View file

@ -256,11 +256,6 @@ const calculateMaxDate = () => {
};
//
const handleDate = async (modelData: Date) => {
informaData.value.birthDate = modelData;
await calRetire(modelData);
};
const calRetire = async (birth: Date) => {
const body = {
birthDate: dateToISO(birth),
@ -272,6 +267,7 @@ const calRetire = async (birth: Date) => {
.then((res: any) => {
const data = res.data.result;
informaData.value.age = data.age;
informaData.value.birthDate = birth;
changeRetireText(data.retireDate);
dateBefore.value = birth;
})
@ -390,7 +386,7 @@ const clickBack = () => {
<div class="row col-12 q-col-gutter-x-sm q-mb-xs">
<div class="col-xs-6 col-sm-2 col-md-2">
<datepicker v-model="informaData.birthDate" :locale="'th'" autoApply :enableTimePicker="false" week-start="0"
:max-date="calculateMaxDate()" @update:model-value="handleDate">
:max-date="calculateMaxDate()" @update:model-value="calRetire">
<template #year="{ year }">
{{ year + 543 }}
</template>