แก้ไขไม่ให้เลือกวันเกิน Date now
This commit is contained in:
parent
d2db87cc2e
commit
d2a50125a5
3 changed files with 354 additions and 161 deletions
|
|
@ -8,6 +8,12 @@ const mixin = useCounterMixin();
|
|||
|
||||
const { date2Thai } = mixin;
|
||||
const { filterFn, searchDataFn } = workStore;
|
||||
|
||||
function calculateMaxDate() {
|
||||
const today = new Date();
|
||||
today.setDate(today.getDate() - 1);
|
||||
return today;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -20,6 +26,7 @@ const { filterFn, searchDataFn } = workStore;
|
|||
autoApply
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
:max-date="calculateMaxDate()"
|
||||
@update:model-value="
|
||||
searchDataFn(workStore.selectDate, workStore.selectStatus)
|
||||
"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue