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: using yearNavigator cause exception error #5973

Closed
CapooCat opened this issue Feb 15, 2024 · 2 comments · Fixed by #5981
Closed

Calendar: using yearNavigator cause exception error #5973

CapooCat opened this issue Feb 15, 2024 · 2 comments · Fixed by #5981
Assignees
Labels
Resolution: Workaround Issue or pull request contains a workaround. It needs to be reviewed further by Core Team Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@CapooCat
Copy link

Describe the bug

When adding yearNavigator=true to the Calendar component an exception error happens, causing the component to not render

Reproducer

https://stackblitz.com/run?file=src%2FApp.jsx

PrimeReact version

10.5.1

React version

18.x

Language

ES6

Build / Runtime

Vite

Browser(s)

Chrome 121

Steps to reproduce the behavior

  1. Go to the reproducer.
  2. Add the yearNavigator=true attribute to the Calendar component
  3. Check the console.

Expected behavior

Render the Calendar component with year dropdown selection

@CapooCat CapooCat added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 15, 2024
melloware added a commit to melloware/primereact that referenced this issue Feb 15, 2024
@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 Feb 15, 2024
@melloware melloware self-assigned this Feb 15, 2024
@melloware melloware added this to the 10.5.2 milestone Feb 15, 2024
@melloware
Copy link
Member

Definitely a bug but here is a workaround by setting yearRange="1950:2050"

https://stackblitz.com/edit/56nfbn?file=src%2FApp.jsx

@CapooCat
Copy link
Author

thank you very much

Definitely a bug but here is a workaround by setting yearRange="1950:2050"

https://stackblitz.com/edit/56nfbn?file=src%2FApp.jsx

@melloware melloware added the Resolution: Workaround Issue or pull request contains a workaround. It needs to be reviewed further by Core Team label Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Workaround Issue or pull request contains a workaround. It needs to be reviewed further by Core Team 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