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: The yearNavigator does not update the displayed year after selecting a new year. #7234

Closed
berubemartin opened this issue Sep 23, 2024 · 0 comments · Fixed by #7252
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@berubemartin
Copy link

berubemartin commented Sep 23, 2024

Describe the bug

If you select a month, the month name is correctly displayed in the dropdown. However, if you select a year, the year does not update in the dropdown.

I replicated this issue using your Stackblitz environment with the following code:

  <Calendar
    value={date}
    onChange={(e) => setDate(e.value)}
    showButtonBar
    monthNavigator={true}
    yearNavigator={true}
  />

Reproducer

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

System Information

npmPackages:
    primereact: 10.8.2 => 10.8.2 
    react: 18.2.0 => 18.2.0 
  Binaries:
    Node: 20.16.0 - /usr/local/bin/node
    npm: 10.8.1 - /usr/local/bin/npm

Steps to reproduce the behavior

Set yearNavigator={true} in the Calendar component, then try to change the year using the dropdown. The selected year is not updated in the dropdown

Expected behavior

The selected year should be displayed correctly in the dropdown

@berubemartin berubemartin added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Sep 23, 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 Sep 24, 2024
@melloware melloware added this to the 10.8.4 milestone Sep 25, 2024
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