datepicker icon indicating copy to clipboard operation
datepicker copied to clipboard

can't access property "contains"

Open julienmiclo opened this issue 1 year ago • 1 comments

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.

julienmiclo avatar Jul 06 '23 20:07 julienmiclo

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 })

panjohur avatar Aug 18 '23 13:08 panjohur