We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
year picker (showYearPicker) displays invalid value when value is manually changed into invalid value.
showYearPicker
To Reproduce Steps to reproduce the behavior:
Following code only allows to select years between [2008 .. 2014]
[2008 .. 2014]
() => { const [val, setVal] = useState(new Date("2014/02/08")); const [startDate, setStartDate] = useState(new Date("2008/02/08")); const [endDate, setEndDate] = useState(new Date("2014/04/08")); return ( <DatePicker selected={val} onChange={(date) => setVal(date)} showYearPicker dateFormat="yyyy" minDate={startDate} maxDate={endDate} /> ); };
Expected behavior Valid value displayed in input
Screenshots
Here is quick video of reproduced issue
Additional context Tried it locally on v8 and latest v8.2.1 version of react-datepicker Also on your documentation website (attached video)
react-datepicker
The text was updated successfully, but these errors were encountered:
The issue occurs as in the initial case the calendar is not in a open mode. So only next time, when the calendar gets closed it's working.
I'll look into it.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
year picker (
showYearPicker
) displays invalid value when value is manually changed into invalid value.To Reproduce
Steps to reproduce the behavior:
Following code only allows to select years between
[2008 .. 2014]
Expected behavior
Valid value displayed in input
Screenshots
Here is quick video of reproduced issue
Screen.Recording.2025-03-24.at.08.54.15.mov
Additional context
Tried it locally on v8 and latest v8.2.1 version of
react-datepicker
Also on your documentation website (attached video)
The text was updated successfully, but these errors were encountered: