fix minDate
This commit is contained in:
parent
86c6cc5236
commit
ba4239d87c
1 changed files with 9 additions and 0 deletions
|
|
@ -399,6 +399,14 @@ function changeCardID(citizenId: string | number | null) {
|
|||
function calculateMaxDate() {
|
||||
const today = new Date();
|
||||
today.setFullYear(today.getFullYear() - 18);
|
||||
|
||||
return today;
|
||||
}
|
||||
|
||||
/** function เช็คอายุไม่เกิน 60 ปี*/
|
||||
function calculateMinDate() {
|
||||
const today = new Date();
|
||||
today.setFullYear(today.getFullYear() - 60); // ลดปีลงไป 60 ปี
|
||||
return today;
|
||||
}
|
||||
|
||||
|
|
@ -655,6 +663,7 @@ onMounted(() => {
|
|||
<datepicker
|
||||
autoApply
|
||||
:max-date="calculateMaxDate()"
|
||||
:min-date="calculateMinDate()"
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue