You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
I'm trying to use datepicker with inputs inside of it, and I ran into an unpleasant bug: each time I click on one of the inputs or press any key, calendar is toggled (shown if it was hidden and vice versa). I reproduced it on codesandbox: https://codesandbox.io/s/4zx1l0n6p4 You can also see the versions of the dependencies I'm using there.
Update: I managed to get it to work by installing version 3.4.0 and replacing two inputs with single input: https://codesandbox.io/s/kwy30z9rl3.
The but I described is probably caused by the addition of the wrapper div in one of the later versions, because bootstrap-daterangepicker checks if the parent of the datepicker is an input/button and apllies the necessary event handlers:
Hi!
I'm trying to use datepicker with inputs inside of it, and I ran into an unpleasant bug: each time I click on one of the inputs or press any key, calendar is toggled (shown if it was hidden and vice versa). I reproduced it on codesandbox: https://codesandbox.io/s/4zx1l0n6p4 You can also see the versions of the dependencies I'm using there.
Update: I managed to get it to work by installing version 3.4.0 and replacing two inputs with single input: https://codesandbox.io/s/kwy30z9rl3.
The but I described is probably caused by the addition of the wrapper div in one of the later versions, because bootstrap-daterangepicker checks if the parent of the datepicker is an input/button and apllies the necessary event handlers:
And since the element in question is a plain div, every click or keypress on the input triggers toggle.
The text was updated successfully, but these errors were encountered: