RED-6122: Add new comparator for form values.
This commit is contained in:
parent
42988aa9ed
commit
66f13e9ef0
@ -116,6 +116,10 @@ export function hasFormChanged(form: UntypedFormGroup, initialFormValue: Record<
|
||||
if (!(updatedValue as Dayjs).isSame(dayjs(initialValue), 'day')) {
|
||||
return true;
|
||||
}
|
||||
} else if (updatedValue instanceof Date && dayjs(initialValue as any).isValid()) {
|
||||
if (!dayjs(updatedValue).isSame(dayjs(initialValue as any), 'day')) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user