fix: month select plugin out of sync when setDate() is used to set selected date by carlosgrossi · Pull Request #3068 · flatpickr/flatpickr · GitHub
Skip to content

fix: month select plugin out of sync when setDate() is used to set selected date - #3068

Open
carlosgrossi wants to merge 1 commit into
flatpickr:masterfrom
carlosgrossi:master
Open

carlosgrossi wants to merge 1 commit into
flatpickr:masterfrom
carlosgrossi:master

Conversation

@carlosgrossi

@carlosgrossi carlosgrossi commented Jan 9, 2025 •

Copy link
Copy Markdown

This fixes a bug in the month select plugin where it will not show the correct selected date when tp.setDate() is used to set a selected date as described in #3067

The proposed solution in the PR is to call selectYear and buildMonths functions on the onOpen event so the DOM can be properly updated with the new date selected.

Zierk59 pushed a commit to Zierk59/flatpickr that referenced this pull request May 12, 2025
8co added a commit to 8co/flatpickr-next that referenced this pull request Jun 24, 2026

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant