Open westy92 opened 8 years ago
The picker is bound on focus event
Ah, I see. It's my fault for binding it to a button rather than an input field.
i am interested to do a pull request for this issue, which is a duplicate of #61. i would suggest to add an "autoOpen" option, (default: true, to not break existing code). if set to false, focus should not trigger open. and for convenience, add a wrapper method to call _setFocus.
i think this way you can attach the datetimepicker to an editable inputbox, but attach the "open" method to a button's click. this should work nice for a bootstrap input-group with a datepicker icon toggling the actual picker.
I think it would be good idea that could be opened directly by an event such as a modal. It would be much more flexible and does not require a constant input.
I'll had an open function in the next release. You could manage events as you want.
This may be desired behavior, but clicking on the input field with the right mouse button (or scroll wheel) still opens up the picker.