T00rk / bootstrap-material-datetimepicker

Datepicker for bootstrap-material
http://t00rk.github.io/bootstrap-material-datetimepicker/
MIT License
9 stars 4 forks source link

Picker opens even with a right-click of the mouse. #73

Open westy92 opened 8 years ago

westy92 commented 8 years ago

This may be desired behavior, but clicking on the input field with the right mouse button (or scroll wheel) still opens up the picker.

T00rk commented 8 years ago

The picker is bound on focus event

westy92 commented 8 years ago

Ah, I see. It's my fault for binding it to a button rather than an input field.

e-frank commented 8 years ago

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.

j0ssGZ commented 8 years ago

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.

T00rk commented 8 years ago

I'll had an open function in the next release. You could manage events as you want.