[BUG] Selecting dates in previous and next month doesn't update active month
Closed this issue · 0 comments
- I have written a good issue
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
- Go to https://cookbook.kirby.design/#/home/showcase/calendar
- Click on a date in the previous or next month of the first calender example
- See the date being selected correctly (the
Selected Date:
property at the bottom of the calendar example) - 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
:
Please complete the following information:
- OS: [e.g. Windows, MacOS, iOS]
- Browser [e.g. Chrome, Safari]
- Browser version [e.g. 22]
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.
- Make sure the
NOT verified
label has been removed by a member of team Kirby; do not proceed until this is done.
Implementation
The contributor who wants to implement this issue should:
- Make sure you have read: "Before you get coding".
- Signal to others you are working on the issue by assigning yourself.
- Create a branch from the develop branch following our branch naming convention.
- Create a test that reproduces the bug following guidelines in: "The good: Test".
- Write code to fix the bug
Review
Once the issue has been implemented and is ready for review:
- Do a self-review.
- Create a pull-request.