shouldDisableDate does not work when using "Year picker"
See original GitHub issueWhen using DatePicker to select an year shouldDisableDate
does not work.
<DatePicker
views={['year']}
shouldDisableDate={day => true}
still displays all years from 1900 to 2100
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (9 by maintainers)
Top Results From Across the Web
shouldDisableDate does not work when using "Year picker"
When using DatePicker to select an year shouldDisableDate does not work. true} still displays all years from 1900 to 2100.
Read more >MUI DatePicker's shouldDisableDate prop leading to error
But when I press the datepicker it is leading to this error. The minDate is working perfectly fine using the fromDate state variable....
Read more >Material ui disbale specific dates! - CodeProject
I want to disable specific dates in the date picker using the props shouldDisableDates, but as it accepts only functions I have written...
Read more >StaticDateTimePicker API - MUI X
Name Type Default
onChange * func
renderInput * func
acceptRegex RegExp /\dap/gi
Read more >React 17 Material-UI Datepicker and Timepicker Example ...
There are a number of UI components provided by Material UI package modules. To use a component we first import it in the...
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
I think it will only make it easier to lose that you will disable a whole year by disabling just the first day. Moreover, it will introduce a weird and easy-to-miss breaking change.
@dmtrKovalenko I’m using @material-ui/pickers 3.2.10 and I do not see shouldDisableYear or shouldDisableMonth in my DatePickerProps definition. Am I doing something wrong or perhaps have the TS definitions not been updated?