kirbydesign / designsystem

Kirby Design System
https://cookbook.kirby.design
MIT License
82 stars 22 forks source link

[BUG] Selecting dates in previous and next month doesn't update active month #3451

Closed jakobe closed 2 months ago

jakobe commented 2 months ago

Describe the bug

PR #3423 enabled selection of dates in previous and next month.

While the date does get selected and emitted correctly, the view isn't updated to reflect the new current month (previous or next from the initial month).

This leads to rendering the wrong selected day, e.g. selecting 30 Dec 2024 when active month is January 2025 renders 30 Jan 2025 as being selected (see screenshot below) even though the date emitted in dateChange and dateSelect is correct, i.e. 30 Dec 2024.

Describe how to reproduce the bug

  1. Go to https://cookbook.kirby.design/#/home/showcase/calendar
  2. Click on a date in the previous or next month of the first calender example
  3. See the date being selected correctly (the Selected Date: property at the bottom of the calendar example)
  4. See the month at the top of the calendar not being update to the selected month

Which Kirby version was used?

9.4.1

What was the expected behavior?

Calendar should switch to the month being selected (previous or next).

Add any screenshots

Initial month January 2025, selected date 30 Dec 2024: image

Please complete the following information:

Are there any additional context?


Checklist:

The following tasks should be carried out in sequence in order to follow the process of contributing correctly.

Verification

To make sure the bug is not intended behaviour; it should be verified by a member of team Kirby before moving on to implementation.

Implementation

The contributor who wants to implement this issue should:

Review

Once the issue has been implemented and is ready for review: