I have not found a way to extract the current set value of the incomplete date. '0002-04-02' is a valid JS date but an invalid SQL date). But if you hit the focus/blur events as I also mentioned, the interval will only run temporarely. When you use the keyboard, you're constructing the date, piece by piece. That is not a problem for many purposes, but is worth noting nevertheless. I would suggest using the keyup event something like below: There are a few ways of achieving the same result so I guess it's down to preference and depends on how you want it to work exactly. To learn more, see our tips on writing great answers. your coworkers to find and share information. Yes you can but kindly check support for the browser for date time support. Yeah!

also, change seems to still be required to capture checkboxes. That will probably fire twice when an element is changed (1st), and loses focus (2nd). By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service. (, I doubt that the OP wants to target those old browsers (2011. Note that change will only fire when the input element has lost focus. In case of Chrome the event will not be fired unless the whole date is input! Is there an option? Since the change event is fired in all cases, maybe the best way to proceed is to implement a changed handler and a blur handler to catch both cases. I would not be surprised if implementations differ in various mobile browsers. The event handler can be bound to the input field: I totally agree with Andy; all depends on how you want it to work. @AlexanderDerck I tested it within an AVD with Android 8 and Android Browser and it seems the blur event is not fired, because the datepicker is still on focus after the popup closes. The change event occurs when the value of an element has been changed (only works on ,