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

can't access property "contains" #140

Open
julienmiclo opened this issue Jul 6, 2023 · 1 comment
Open

can't access property "contains" #140

julienmiclo opened this issue Jul 6, 2023 · 1 comment

Comments

@julienmiclo
Copy link

Hello,
i don't know if it's a bug, miss condition or just me but i have an error when i load, remove and reload the datepicker on the same input.

i use 5.18.2 with vuejs 3.

Uncaught TypeError: can't access property "contains", e3.calendar is undefined

stack trace

datepicker js-datepicker.js:153
L datepicker.min.js:1
datepicker js-datepicker.js:54
d datepicker.min.js:1
datepicker js-datepicker.js:401

i don't know how to fix this but i will try to fork this repo.

@panjohur
Copy link

Hi, on line 1699, the remove method compares objects _this and picker, it's work while not using vue, but vue change type of object _this from Object to Proxy Object and objects become unequals, replace object comparison with object property comparison, like this:
datepicker = datepicker.filter(function(picker) { return picker.el !== _this.el })

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