From fe2793dae134b1e07e30670ab9726961d5722efd Mon Sep 17 00:00:00 2001 From: Akshith <33996844+akshith312@users.noreply.github.com> Date: Tue, 24 Feb 2026 21:15:51 -0800 Subject: [PATCH 1/2] fix: fixed event date selector from choosing past date --- .../Reports/Participation/CreateEventModal.jsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/components/CommunityPortal/Reports/Participation/CreateEventModal.jsx b/src/components/CommunityPortal/Reports/Participation/CreateEventModal.jsx index 5707d9a506..f3a47403a5 100644 --- a/src/components/CommunityPortal/Reports/Participation/CreateEventModal.jsx +++ b/src/components/CommunityPortal/Reports/Participation/CreateEventModal.jsx @@ -90,6 +90,16 @@ function CreateEventModal({ isOpen, toggle }) { newErrors.date = 'Date is required'; } + if (formData.date) { + const selectedDate = moment(FormDataEvent.date, 'YYYY-MM-DD').startOf('day'); + const today = moment() + .tz('America/Los_Angeles') + .startOf('day'); + if (selectedDate.isBefore(today)) { + newErrors.date = 'Event Date Cannot be in the past'; + } + } + if (!formData.startTime) { newErrors.startTime = 'Start time is required'; } @@ -273,6 +283,9 @@ function CreateEventModal({ isOpen, toggle }) { value={formData.date} onChange={handleChange} disabled={loading} + min={moment() + .tz('America/Los_Angeles') + .format('YYYY-MM-DD')} style={darkMode ? { colorScheme: 'dark' } : {}} /> {errors.date &&
{errors.date}
} From 56dd4cdd13d5e02a87d6cb9b328d78b20c5748aa Mon Sep 17 00:00:00 2001 From: Akshith <33996844+akshith312@users.noreply.github.com> Date: Tue, 24 Feb 2026 21:38:04 -0800 Subject: [PATCH 2/2] fix: fixed manual past date entries --- .../CommunityPortal/Reports/Participation/CreateEventModal.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/CommunityPortal/Reports/Participation/CreateEventModal.jsx b/src/components/CommunityPortal/Reports/Participation/CreateEventModal.jsx index f3a47403a5..42d88bdf2c 100644 --- a/src/components/CommunityPortal/Reports/Participation/CreateEventModal.jsx +++ b/src/components/CommunityPortal/Reports/Participation/CreateEventModal.jsx @@ -91,7 +91,7 @@ function CreateEventModal({ isOpen, toggle }) { } if (formData.date) { - const selectedDate = moment(FormDataEvent.date, 'YYYY-MM-DD').startOf('day'); + const selectedDate = moment(formData.date, 'YYYY-MM-DD').startOf('day'); const today = moment() .tz('America/Los_Angeles') .startOf('day');