From b0b0b41845760c66a702eb5aceaa4259660c5439 Mon Sep 17 00:00:00 2001 From: Daniel Xue Date: Sat, 24 Aug 2024 23:08:25 -0400 Subject: [PATCH] gate check behind isrecurring check. --- .../InstructorCalendar/InstructorCalendarModals.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/components/Calendar/InstructorCalendar/InstructorCalendarModals.tsx b/frontend/components/Calendar/InstructorCalendar/InstructorCalendarModals.tsx index 4857c8a9..4a7fe232 100644 --- a/frontend/components/Calendar/InstructorCalendar/InstructorCalendarModals.tsx +++ b/frontend/components/Calendar/InstructorCalendar/InstructorCalendarModals.tsx @@ -276,8 +276,9 @@ export const EditEventModal = (props: EditEventProps) => { positive disabled={ endDate <= startDate || - moment(erpDate).endOf("day").toDate() < endDate || !title || + (isRecurring && + moment(erpDate).endOf("day").toDate() < endDate) || (isRecurring && recurringDays.length === 0) } > @@ -390,8 +391,9 @@ export const NewEventModal = (props: NewEventProps) => { type="submit" disabled={ endDate <= startDate || - moment(erpDate).endOf("day").toDate() < endDate || !title || + (isRecurring && + moment(erpDate).endOf("day").toDate() < endDate) || (isRecurring && recurringDays.length === 0) } >