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

p-calendar month picker displays the previously selected year, not the current one #11038

Closed
szandra-homonnai opened this issue Jan 7, 2022 · 2 comments

Comments

@szandra-homonnai
Copy link

I'm submitting a ... (check one with "x")

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports)
The original examples by PrimeNg: https://stackblitz.com/edit/primeng-calendar-demo

Current behavior
In the current p-calendar version, when selecting the year in the picker component, it goes automatically to the month selection, but in the header of month picker the year is wrong, it is not the newly selected year, but the previous one. After the month is selected and picker is closed, the good value is passed to the calendar, so it seems, that the emitted value is good, this error only effects the month picker part.

Expected behavior
After selecting a year, that should be in the header of the month picker.

Minimal reproduction of the problem with instructions
STEPS TO REPRODUCE:
In the inline example click on 2022, choose 2020 in the year picker, it automatically changes to month picker, but in the header it says 2022 as selected year not 2020.

What is the motivation / use case for changing the behavior?
This is misleading behaviour for users.

  • Angular version: 13.0.3

  • PrimeNG version: 13.0.4

  • Browser: all

@aki-kesulahti
Copy link

Another steps to reproduce:
In the "Month Picker" example, click back or forward arrows in order to change year.
Currently the component header doesn't show the year change.

@yigitfindikli
Copy link
Contributor

Fixed in 13.0.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants