Skip to content
New issue

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

Calendar: Year incorrectly disabled in navigator view due to minDate #3967

Closed
castromaciel opened this issue Jan 17, 2023 · 2 comments · Fixed by #3968
Closed

Calendar: Year incorrectly disabled in navigator view due to minDate #3967

castromaciel opened this issue Jan 17, 2023 · 2 comments · Fixed by #3968
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@castromaciel
Copy link

Describe the bug

When a month that is not the first month of the year (January) is set as the minimum date, the entire year is disabled.

Screen.Recording.2023-01-17.at.17.42.43.mov

Reproducer

https://codesandbox.io/embed/cranky-cloud-n76op7?fontsize=14&hidenavigation=1&theme=dark

PrimeReact version

8.7.0

React version

17.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

All

Steps to reproduce the behavior

No response

Expected behavior

The expected behavior is that, even if a few months of a year are disabled, the entire current year should not be disabled. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date

Screen.Recording.2023-01-17.at.17.48.12.mov
@castromaciel castromaciel added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 17, 2023
@melloware melloware changed the title Component: Calendar Calendar: Year incorrectly disabled in navigator view Jan 17, 2023
@melloware 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 Jan 17, 2023
@melloware
Copy link
Member

Looks like a maxdate check was fixed but not a minDate see: #3488

@melloware
Copy link
Member

I submitted a fix. It was only checking the first day of the year was over the maxDate but nothing checking the minDate

@melloware melloware changed the title Calendar: Year incorrectly disabled in navigator view Calendar: Year incorrectly disabled in navigator view due to minDate Jan 18, 2023
mflagey pushed a commit to mflagey/primereact that referenced this issue Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants