ลบ วัน ปัจุบัน ออก

This commit is contained in:
setthawutttty 2023-09-11 15:57:00 +07:00
parent 33db8e63dc
commit bfecec80a8
2 changed files with 11 additions and 5 deletions

View file

@ -97,7 +97,7 @@
autoApply
:enableTimePicker="false"
week-start="0"
:max-date="new Date()"
:max-date="calculateMaxDate()"
:disabled="!edit"
@update:model-value="handleDate"
>
@ -1020,8 +1020,14 @@ const fetchDataComponent = async (modelData: Date) => {
await props.fetchDataProfile();
await fetchData();
};
const calculateMaxDate = () => {
const today = new Date();
today.setDate(today.getDate() - 1);
return today;
}
const calRetire = async (birth: Date) => {
console.log(birth)
const body = {
birthDate: dateToISO(birth),
};