primevue
primevue copied to clipboard
Calendar Component Does Not Immediately Reflect Updated ":view" Property
Describe the bug
In the PrimeVue Calendar component, when switching the :view property dynamically (for example, from "date" to "month" via a Dropdown selection), the calendar does not immediately update to reflect the new view. Instead, it initially displays a partial view (the right half of the calendar appears transparent). The correct view (e.g., "month" view) only appears upon a second interaction with the calendar.
Reproducer
https://codesandbox.io/p/devbox/primevue-calendar-bug-y8dqrz
PrimeVue version
3.29.2
Vue version
3.x
Language
TypeScript
Build / Runtime
Vue CLI App
Browser(s)
No response
Steps to reproduce the behavior
- Go to the reproduction sandbox or run the provided code snippet.
- Interact with the Dropdown to switch the calendar view (e.g., from "Day" to "Month").
- Click inside the Calendar component.
- Observe that the Calendar does not immediately display the "Month" view. The right half of the calendar is transparent on the first interaction.
- Click again inside the Calendar, and observe that now it displays the "Month" view as expected.
Expected behavior
When the :view property of the Calendar component is dynamically updated (e.g., from "Day" to "Month"), the calendar should immediately reflect this change and display the new view correctly upon the first interaction.
I have the same problem. Thanks for reporting!
I just encountered this behaviour in a project.