Javascript examples for DOM HTML Element:Input Datetime Local
The stepDown() method decrements the MINUTES of the local datetime field by a specified number.
Parameter | Description |
---|---|
number | Required. the amount of minutes the datetime field should decrease. If omitted, the minutes are decremented by "1" |
No return value
The following code shows how to Decrement the value of a datetime field by 10 minutes:
<!DOCTYPE html> <html> <body> Date: <input type="datetime-local" id="myLocalDate" value="2014-11-16T15:00:33"> <button onclick="myFunction()">Test</button> <script> function myFunction() {/*from w ww . ja v a2s. c o m*/ document.getElementById("myLocalDate").stepDown(10); } </script> </body> </html>