Is there a way to handle "datetime-selection" event with <input type='datetime-local'> control?
onchange, onselect and oninput does not work for me.
Is there a way to handle "datetime-selection" event with <input type='datetime-local'> control?
onchange, onselect and oninput does not work for me.
(In chrome) the onchange event triggers when the field is completely filled
Also have a read of Why is HTML5 input type datetime removed from browsers already supporting it?
Since onchange does not occur until after the field is fully filled in I ended up doing an onselect that sends new Date() to the onchange handler if the field does not yet have a value. This eliminates the false sense of a value being set (perhaps on a backing object) on the field before the time part of dateime-local is set.