diff --git a/src/forms/CalendarForm/validation/validateExceptions.tsx b/src/forms/CalendarForm/validation/validateExceptions.tsx index fa0e0b15..7a1e50f1 100644 --- a/src/forms/CalendarForm/validation/validateExceptions.tsx +++ b/src/forms/CalendarForm/validation/validateExceptions.tsx @@ -248,12 +248,12 @@ 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))) - .startOf('day'), - endDate: dayjs?.max( - row.rows.map(({ endDate }) => dayjs(endDate))) - .endOf('day') + startDate: dayjs + .min(row.rows.map(({ startDate }) => dayjs(startDate))) + ?.startOf('day'), + endDate: dayjs + .maxrow.rows.map(({ endDate }) => dayjs(endDate))) + ?.endOf('day') })); for (let i = 0; i < rowMinMaxes.length - 1; i++) {