fix mindate ลูกจ้างชั่วคราว
This commit is contained in:
parent
f414951646
commit
4774fadf95
1 changed files with 9 additions and 3 deletions
|
|
@ -223,15 +223,20 @@ function filterSelector(val: string, update: Function, refData: string) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันคำนวนอายุ
|
||||
*/
|
||||
/** ฟังก์ชันคำนวนอายุ*/
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันบันทึกข้อมูลลูกจ้างชั่วคราว
|
||||
*/
|
||||
|
|
@ -390,6 +395,7 @@ watch(
|
|||
<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