From 98bdb1eafb4115cd8607f7a2f723fc087f970344 Mon Sep 17 00:00:00 2001 From: "MSI\\derek" Date: Tue, 28 May 2024 15:21:04 +0800 Subject: [PATCH] update --- src/components/EditStaff/StaffInfo.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/EditStaff/StaffInfo.tsx b/src/components/EditStaff/StaffInfo.tsx index 92ebccf..697c25e 100644 --- a/src/components/EditStaff/StaffInfo.tsx +++ b/src/components/EditStaff/StaffInfo.tsx @@ -417,7 +417,7 @@ const StaffInfo: React.FC = ({ combos }) => { }} slotProps={{ textField: { - required: true, + // required: true, error: joinDate === "Invalid Date" || Boolean(errors.joinDate), // value: errors.joinDate?.message, @@ -466,7 +466,7 @@ const StaffInfo: React.FC = ({ combos }) => { }} slotProps={{ textField: { - error: departDate + error: joinDate && departDate ? new Date(joinDate) > new Date(departDate) : false, },