haoxins / react-flatpickr

flatpickr for React
MIT License
598 stars 102 forks source link

onChange not working flatpickr 4.6.10 #180

Closed Levelsncurves closed 2 years ago

Levelsncurves commented 2 years ago

onChange not working flatpickr 4.6.10

jacobmischka commented 2 years ago

Yeah it is: https://codesandbox.io/s/sad-sutherland-08psny?file=/src/App.js

jacobmischka commented 2 years ago

Oh, you mean the hook in options. You should really be clearer if you want your issues to be taken seriously.

jacobmischka commented 2 years ago

They're actually both working individually, turns out they just clobber each other. Though this has nothing to do with flatpickr 4.6.10, so I don't think this is even what you meant.

Levelsncurves commented 2 years ago

Yeah it is: https://codesandbox.io/s/sad-sutherland-08psny?file=/src/App.js

https://codesandbox.io/s/bold-http-wbrtly

how handle month changes not working

jacobmischka commented 2 years ago

Upstream issue: https://github.com/flatpickr/flatpickr/issues/2651

Levelsncurves commented 2 years ago

Upstream issue: flatpickr/flatpickr#2651

this example link onchange not show any alert there

onChange:function(selectedDates, dateStr, instance) { alert('date changed') },

jacobmischka commented 2 years ago

Workaround is mentioned in that issue. Either pin the flatpickr dependency to a different working version, wait for a flatpickr update, or use the workaround.