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

Calling flatpickr() twice, reinitializes flatpickr #2978

Open
pmishev opened this issue Dec 28, 2023 · 0 comments
Open

Calling flatpickr() twice, reinitializes flatpickr #2978

pmishev opened this issue Dec 28, 2023 · 0 comments

Comments

@pmishev
Copy link

pmishev commented Dec 28, 2023

https://jsfiddle.net/bwghe3v6/

Calling flatpickr(el) on an element that already has a flatpickr instance, should return that instance, not create a new one.
Relying on checking private properties such as ._flatpickr doesn't seem like a good practice, and it has other problems as well - see #2977

Your Environment

  • flatpickr version used: 4.6.13
  • Browser name and version: Chromium 120.0.6099.71
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

1 participant