From 4774fadf95cad17f61531c55554c0eefccf89311 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 14 Jan 2025 15:34:04 +0700 Subject: [PATCH] =?UTF-8?q?fix=20mindate=20=E0=B8=A5=E0=B8=B9=E0=B8=81?= =?UTF-8?q?=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87=E0=B8=8A=E0=B8=B1=E0=B9=88?= =?UTF-8?q?=E0=B8=A7=E0=B8=84=E0=B8=A3=E0=B8=B2=E0=B8=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/DialogAddEmployee.vue | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/modules/08_registryEmployee/components/DialogAddEmployee.vue b/src/modules/08_registryEmployee/components/DialogAddEmployee.vue index 1da8f2be4..59ec45930 100644 --- a/src/modules/08_registryEmployee/components/DialogAddEmployee.vue +++ b/src/modules/08_registryEmployee/components/DialogAddEmployee.vue @@ -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(