Javascript examples for DOM HTML Element:Input Datetime Local
Input DatetimeLocal step Property - Change the legal number intervals for milliseconds in a local date field:
<!DOCTYPE html> <html> <body> Date: <input type="datetime-local" id="myLocalDate" step=".1"> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {// w w w . j ava 2 s . c om document.getElementById("myLocalDate").step = ".020"; document.getElementById("demo").innerHTML = "The value of the step attribute was changed from '.1' to '.050'."; } </script> </body> </html>