Can I select only past dates?
See original GitHub issueBy using isOutsideRange={() => false}
I enabled all past dates. Now I need something like isInsideRange={() => true}
to disable all future dates. Does it exist some built in method to disable future dates?
If not, can somebody advise, how can I use isDayBlocked method to block all future dates?
Thanks.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:7
- Comments:11 (1 by maintainers)
Top Results From Across the Web
How to Datepicker picks future dates only and disable past ...
To make any past dates unselectable, you first have to find the instantiation of the datepicker, and set the minDate setting to zero....
Read more >Can I select only past dates? · Issue #209 · react ... - GitHub
I tried this: isOutsideRange={(day) => day.isAfter(moment()) || day.isBefore(moment().subtract(30, 'days'))} and it is now enabling dates of ...
Read more >Solved: Select present and future dates only
Hello, I wanted to ask if there is a way to have someone only be able to select a date that is today...
Read more >Disable past dates from datepicker in powerapps
In my App, where I datepicker field coming from sharepoint list. I want disable the past dates , user should only select today...
Read more >How to restrict past/future date selection in #servicenow
In this video I've explained how to restrict past /future date selection in date type fieldIf you ... Your browser can 't play...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
isOutsideRange={day => !isInclusivelyBeforeDay(day, moment())}
I tried this:
isOutsideRange={(day) => day.isAfter(moment()) || day.isBefore(moment().subtract(30, 'days'))}
and it is now enabling dates of last 30 days only. Thanks 👍