Skip to content

[Bug]: focusDay event not always getting triggered when navigating back between months with months > 1 and pageBy="single" #112

@dgonzalezr

Description

@dgonzalezr

Hi 👋

I'm trying to implement a custom heading to allow month/year selection in our datepicker component, but I'm facing an issue where the focusDay event is not always getting triggered when navigating back (clicking the Previous button).

Here's a simple reproduction demo: https://codepen.io/dgonzalezr/pen/KwMVxQd

If you check the browser console, you will see that the event is always called when navigating forward (clicking the Next button), but that does not happen when navigating back. In fact, it gets triggered only when a new month “comes” into view. If we switch to pageBy="months" then it works as expected.

CleanShot.2026-01-06.at.10.30.33.mp4

The same happens if we go with months="3" and pageBy="single":

CleanShot.2026-01-06.at.10.36.29.mp4

Probably the expected behavior should be to always trigger the event and the focusedDate to be set to the first month displayed in the <calendar-month> component.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions