time buttons doesn't fire input event
Closed this issue · 4 comments
#As example.
If you enter data into the text field, the event will be fired.
If you press buttons in the datetimepicker, events will not be fired.
Maybe you should take a look at this https://tempusdominus.github.io/bootstrap-4/Events/#changedatetimepicker
I believe the test at ~ line 556 of https://github.com/tempusdominus/bootstrap-4/blob/master/build/js/tempusdominus-bootstrap-4.js
would be more correct - and readable - with parenthesis :
for e.g. e = {type: "datetimepicker.show"}
e.type === DateTimePicker.Event.CHANGE && e.date && e.date.isSame(e.oldDate) || !e.date && !e.oldDate
-> true -> then the function returns and does not fire the event 👎
e.type === DateTimePicker.Event.CHANGE && ((e.date && e.date.isSame(e.oldDate)) || (!e.date && !e.oldDate))
-> false 👍
It still does not work.
https://jsfiddle.net/6h1ak85w