Skip to content

Commit 2485832

Browse files
committed
Fixes date validation in edit form for non-incident events
Updates the date validation logic to ensure that the update date cannot be earlier than the start date for non-incident event types. This change improves the accuracy of the event management process by preventing invalid date entries.
1 parent dbada45 commit 2485832

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Components/Event/useEditForm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export function useEditForm(event: Models.IEvent) {
156156
function setUpdateAt(value = updateAt) {
157157
let err: boolean = false;
158158

159-
if (type !== EventType.Maintenance && value && value < start) {
159+
if (!IsIncident(type) && value && value < start) {
160160
setValUpdateAt("Update Date cannot be earlier than Start Date.");
161161
err = true;
162162
}

0 commit comments

Comments
 (0)