Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defaultViewDate not select #172

Open
Kossin7 opened this issue Nov 7, 2023 · 1 comment
Open

defaultViewDate not select #172

Kossin7 opened this issue Nov 7, 2023 · 1 comment

Comments

@Kossin7
Copy link

Kossin7 commented Nov 7, 2023

Hi!
const datePaymentPage = new Datepicker(document.querySelector('#datePaymentPage'), { autohide: true, pickLevel: 1, format: 'MM yyyy', });
document.querySelector('#datePaymentPage').addEventListener("changeMonth", (e) => { console.log(e.detail.date); });

Event changeMonth not called, becose selected defaultViewDate.
If select another moth it's work.
Now you have to select another month and back to the current one for the event to work
How fix it?

@mymth
Copy link
Owner

mymth commented Nov 12, 2023

I'm so sorry, but I can't catch what you are trying to say by "because selected defaultViewDate". Could you please explain in more detail?

Just in case you are unclear about this. As stated here, the event is triggered when the focused date is changed to a different month's date. In other words, it will not be triggered until the focused date is changed by the user's action (clicking the prev/next button, pressing arrow keys) or setFocusedDate() API call, or through selecting another month's date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants