You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a maxDate prop to a Calendar component. You won't be able to select days or months bigger than the current one, but you can select years in the future just fine. Also, selecting a year in the future will display a month selection screen with all months disabled (expected)
add maxDate={new Date()} as a prop to a Calendar component
click the year selector when picking a new date
select a year in the future
Expected behavior
Years in the future should be disabled, same as with the month selector screen
Actual behavior
Years in the future can be selected, but months are disabled, so the user has to go back and select another year, or click on < until they reach the current year.
The text was updated successfully, but these errors were encountered:
melloware
changed the title
Year selection ignores maxDate
Calendar: Year selection ignores maxDate
Oct 20, 2022
melloware
added
Type: Bug
Issue contains a defect related to a specific component.
and removed
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
labels
Oct 20, 2022
Describe the bug
Add a maxDate prop to a Calendar component. You won't be able to select days or months bigger than the current one, but you can select years in the future just fine. Also, selecting a year in the future will display a month selection screen with all months disabled (expected)
Reproducer
https://codesandbox.io/s/beautiful-leftpad-j73ru6
PrimeReact version
8.6.1
React version
17.x
Language
ALL
Build / Runtime
Any
Browser(s)
Any
Steps to reproduce the behavior
maxDate={new Date()}
as a prop to a Calendar componentExpected behavior
Years in the future should be disabled, same as with the month selector screen
Actual behavior
Years in the future can be selected, but months are disabled, so the user has to go back and select another year, or click on
<
until they reach the current year.The text was updated successfully, but these errors were encountered: