diff --git a/src/forms/CalendarForm/validation/validateExceptions.tsx b/src/forms/CalendarForm/validation/validateExceptions.tsx index fc5c0cd2..ae121096 100644 --- a/src/forms/CalendarForm/validation/validateExceptions.tsx +++ b/src/forms/CalendarForm/validation/validateExceptions.tsx @@ -249,17 +249,12 @@ export function validateExceptionInterOverlaps( rows.map((row) => ({ i: row.i, startDate: dayjs - .min( - row.rows - .map(({ startDate }) => dayjs(startDate)) - .filter((date) => date.isValid()) - ) + .min(row.rows.map(({ startDate }) => dayjs(startDate)) + .filter((date) => date !== null)) .startOf('day'), endDate: dayjs - .max( - row.rows.map(({ endDate }) => dayjs(endDate)) - .filter((date) => date.isValid()) - ) + .max(row.rows.map(({ endDate }) => dayjs(endDate)) + .filter((date) => date !== null)) .endOf('day') }));