From ba4239d87c340cd48a3dfb880747ba34bd298477 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 14 Jan 2025 14:37:50 +0700 Subject: [PATCH] fix minDate --- .../components/detail/PersonalInformation/01_Profile.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/modules/04_registryPerson/components/detail/PersonalInformation/01_Profile.vue b/src/modules/04_registryPerson/components/detail/PersonalInformation/01_Profile.vue index ed933ee3c..e669de283 100644 --- a/src/modules/04_registryPerson/components/detail/PersonalInformation/01_Profile.vue +++ b/src/modules/04_registryPerson/components/detail/PersonalInformation/01_Profile.vue @@ -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(() => {