Closed jasozh closed 4 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
lagos-volunteers | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 9, 2024 1:11am |
Doesn't this mean that they wouldn't be able to create events on the same day? There is an alternative prop that we can pass into the timepicker that will prevent times before the current time. See here
Doesn't this mean that they wouldn't be able to create events on the same day? There is an alternative prop that we can pass into the timepicker that will prevent times before the current time. See here
Actually just noticed that disablePast was the prop that was removed
I pushed a commit that:
disablePast
for the TimePicker component tooFinally implemented proper solution which is just to create a new timeAndDateValidation()
function that checks to see (before submission) if the input date is before the current datetime.
Summary
Fixes a current bug where supervisors can create events that are in the past if they happen on the same day if they select a time that is earlier than now (e.g. if today is 4/13 5:00 pm, supervisors can still create an even that happens on 4/13 from 8:00 am to 9:00 am). Solution: make the minimum event date tomorrow (also means we don't need to do more cumbersome date validation).
Testing
Notes