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

Fix duplicated flatpickr calendar - DOM elements #2600

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

sascha-karnatz
Copy link
Contributor

What is this pull request for?

The datepicker is initialized multiple times, because the attribute is changing during the creation. Also the flatpickr calendar is not destroyed after the alchemy-datepicker is removed.

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

@sascha-karnatz sascha-karnatz force-pushed the fix-flatpickr-component branch 2 times, most recently from dc002a1 to 2385ca1 Compare October 16, 2023 15:01
The datepicker is initialized multiple times, because the type attribute is reserved and had a side effect that triggered two times during the initialization. The datepicker now destroys the flatpickr instance, when the component will be removed from the DOM.
@tvdeyen tvdeyen merged commit 6da2fa5 into AlchemyCMS:main Oct 16, 2023
19 checks passed
@sascha-karnatz sascha-karnatz deleted the fix-flatpickr-component branch October 17, 2023 06:54
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.

2 participants