[Bug?] disablePastDates also disables today
Philzen opened this issue · comments
See https://uselessdev-datepicker.netlify.app/?path=/docs/calendar--disable-past-dates
The current day is disabled, although (at least to my understanding) it does not yet lie in the past.
Hi @Philzen
You're right, I agree that the today
is not a 'past date' but also is not a future date so it's confusing to me how can we handle this.
For now, my suggestion is that if you need to disable past dates but keep the current date active use disablePastDates={subDays(new Date(), 1)}
For now, my suggestion is that if you need to disable past dates but keep the current date active use
disablePastDates={subDays(new Date(), 1)}
Thanks, and that's exactly what i did as a workaround for the time being. I understand fixing this may feel like a breaking change to some users, hence i suggest to do this as well when going to v3.0 to stay semver.