diff --git a/src/forms/CalendarForm/validation/validateExceptions.tsx b/src/forms/CalendarForm/validation/validateExceptions.tsx index 01c7ed17..23106313 100644 --- a/src/forms/CalendarForm/validation/validateExceptions.tsx +++ b/src/forms/CalendarForm/validation/validateExceptions.tsx @@ -248,11 +248,11 @@ export function validateExceptionInterOverlaps( const rowMinMaxes: { i: number; startDate: Dayjs; endDate: Dayjs }[] = rows.map((row) => ({ i: row.i, - startDate: dayjs - .min(row.rows.map(({ startDate }) => dayjs(startDate))) + startDate: dayjs?.min(row.rows + .map(({ startDate }) => dayjs(startDate))) .startOf('day'), - endDate: dayjs - .max(row.rows.map(({ endDate }) => dayjs(endDate))) + endDate: dayjs?.max(row.rows + .map(({ endDate }) => dayjs(endDate))) .endOf('day') }));