react-flatpickr
react-flatpickr copied to clipboard
How to destroy datepicker instance from one route to another?
I am getting the following error.
Uncaught TypeError: this.flatpickr.destroy is not a function at DateTimePicker.componentWillUnmount
For information:: key: 'componentWillUnmount', value: function componentWillUnmount() { this.flatpickr.destroy(); }
Uncaught TypeError: this.flatpickr.destroy is not a function at t.value
Sorry, are you trying to manually destroy it, or is that destroy()
call being made by this library?
I have been using mern application and I am using routing. When I route one (which have flatpickr) to another (this route dont have flastpickr) this error shows in the console.
key: 'componentWillUnmount', value: function componentWillUnmount() { this.flatpickr.destroy(); }
Hi, is there any updates on this? it is still happening on lazy loaded components.