Input DatetimeLocal stepUp() Method - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Datetime Local


The stepDown() method increments the MINUTES of the local datetime field by a specified number.

Parameter Values

Parameter Description
numberRequired. the amount of minutes the datetime field should increase. If omitted, the minutes are incremented by "1"

Return Value:

No return value

The following code shows how to Increment the value of a datetime field by 10 minutes:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
Date: <input type="datetime-local" id="myLocalDate" value="2014-11-16T15:00:33">

<button onclick="myFunction()">Test</button>

function myFunction() {/* ww w.j av  a  2s  . co  m*/


Related Tutorials