Calendar: Can't pick year if use minDate and maxDate with lass then one year #4537
Labels
Resolution: Duplicate
Issue has already been reported or a pull request related to same issue has already been submitted
Milestone
Describe the bug
I use minDate and maxDate props in the Calender component, but we have a range less them year, and if we click to a year in Calendar top bar the current year is disabled
Step to reproduce:
<Calendar value={date} onChange={(e) => setDate(e.value)} minDate={new Date("06.01.2023")} maxDate={new Date("06.30.2023")} />
Demo:
https://codesandbox.io/s/primereact-demo-forked-m7pgjw?file=/src/App.js:243-407
Expected behavior:
After clicking on the year I will see a list of years where 2023 is available to select, after clicking on the 2023 year I will see a list of months where June is available to click
Reproducer
https://codesandbox.io/s/primereact-demo-forked-m7pgjw?file=/src/App.js:243-407
PrimeReact version
9.3.1
React version
17.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
All
Steps to reproduce the behavior
<Calendar value={date} onChange={(e) => setDate(e.value)} minDate={new Date("06.01.2023")} maxDate={new Date("06.30.2023")} />
Expected behavior
After clicking on the year I will see a list of years where 2023 is available to select, after clicking on the 2023 year I will see a list of months where June is available to click
The text was updated successfully, but these errors were encountered: