error msg when end date not selected (#19485)
This commit is contained in:
1 parent
564497ec2a
commit
aa8d0f78d6
2 files changed
+12
-7
No files matched your search
@@ -147,7 +147,11 @@ export const CreateOrEditOutOfOfficeEntryModal = ({
|
||||
<form
|
||||
id="create-or-edit-ooo-form"
|
||||
onSubmit={handleSubmit((data) => {
|
||||
createOrEditOutOfOfficeEntry.mutate(data);
|
||||
if (!data.dateRange.endDate) {
|
||||
showToast(t("end_date_not_selected"), "error");
|
||||
} else {
|
||||
createOrEditOutOfOfficeEntry.mutate(data);
|
||||
}
|
||||
})}>
|
||||
<div className="h-full px-1">
|
||||
<DialogHeader
|
||||
|
||||
Reference in new issue
Block a user