THE WORLD'S LARGEST WEB DEVELOPER SITE

Input DatetimeLocal stepUp() Method

❮ Input DatetimeLocal Object

Example

Increment the value of a datetime field by 10 minutes:

document.getElementById("myLocalDate").stepUp(10);
Try it Yourself »

Definition and Usage

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

This method will only have an affect on MINUTES (not years, months, days, hours, seconds or milliseconds).

Tip: To decrement the value, use the stepDown() method.


Browser Support

Method
stepUp() Yes 12.0 Not supported Yes Yes

Syntax

datetimelocalObject.stepDown(number)

Parameter Values

Parameter Description
number Required. Specifies the amount of minutes the datetime field should increase.

If omitted, the minutes are incremented by "1"

Technical Details

Return Value: No return value

More Examples

Example

Increment the minutes by 1 (default):

document.getElementById("myLocalDate").stepUp();
Try it Yourself »

❮ Input DatetimeLocal Object