primevue icon indicating copy to clipboard operation
primevue copied to clipboard

Calendar Component Does Not Immediately Reflect Updated ":view" Property

Open osemec opened this issue 1 year ago • 2 comments

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

  1. Go to the reproduction sandbox or run the provided code snippet.
  2. Interact with the Dropdown to switch the calendar view (e.g., from "Day" to "Month").
  3. Click inside the Calendar component.
  4. Observe that the Calendar does not immediately display the "Month" view. The right half of the calendar is transparent on the first interaction.
  5. 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.

osemec avatar Nov 30 '23 13:11 osemec

I have the same problem. Thanks for reporting!

joda01 avatar Jan 28 '24 12:01 joda01

I just encountered this behaviour in a project.

ZakMcRae avatar Feb 01 '24 19:02 ZakMcRae