Question: how to disable future days/months
See original GitHub issueHi y’all,
I’m working on an app that needs to display some historical data in a graph. I would like to the restrict the user to only be able to choose past days/months. How is this possible here? I see the isOutsideRange
but I’m not sure if that’s the one to use and how to go on about it.
Best regards Dan
Issue Analytics
- State:
- Created 7 years ago
- Comments:6
Top Results From Across the Web
Question: how to disable future days/months #390 - GitHub
Hi @dgsunesen! You can accomplish this by doing: import { isInclusivelyAfterDay } from 'react-dates'; const today = moment(); // alternatively ...
Read more >How to disable future dates in datepicker? - Stack Overflow
You can do this: Datepicker has an option maxDate. $(document).ready(function () { var today = new Date(); $('.datepicker').datepicker({ ...
Read more >How to disable future dates in JavaScript Datepicker?
How to disable future dates in JavaScript Datepicker? - In order to disable future dates, you need to use maxDate and set the...
Read more >Need to disable future date in Date Time Calendar Control
Open the properties of the particular date property.Go to presentation tab,go to the display range and uncheck the checkbox for Next and enter...
Read more >Solved: Disable the future dates in datepicker
However you can achieve this using formulas. Check workarounds given in below posts, it should help you: DatePicker - disable future days. Restrict...
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
To get this to work I had to do
After attempting this, I believe
day
andtoday
need to be switched?isOutsideRange={day => isInclusivelyAfterDay(day, today)}