IO-1857 Resolve time ticket update fix.

This commit is contained in:
Patrick Fic
2022-05-03 11:33:31 -07:00
parent d533423fb6
commit e348110bdd

View File

@@ -237,7 +237,11 @@ export function TimeTicketModalComponent({
return Promise.reject(
t("timetickets.validation.clockoffwithoutclockon")
);
if (value && !value.isSameOrAfter(clockon))
if (
value &&
value.isSameOrAfter &&
!value.isSameOrAfter(clockon)
)
return Promise.reject(
t("timetickets.validation.clockoffmustbeafterclockon")
);