THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Input DatetimeLocal stepDown() Method

Input DatetimeLocal Object Reference Input DatetimeLocal Object

Example

Decrement the value of a datetime field by 10 minutes:

document.getElementById("myLocalDate").stepDown(10);
Try it yourself »

Definition and Usage

The stepDown() method decrements 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 increment the value, use the stepUp() method.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The stepDown() method is supported in all major browsers, except Internet Explorer.

Note: In Safari, you must enter a date in the datetime field before you can decrement the minutes.

Note: <input> elements with type="datetime-local" are not supported in Internet Explorer or Firefox.


Syntax

datetimelocalObject.stepDown(number)

Parameter Values

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

If omitted, the minutes are decremented by "1"

Technical Details

Return Value: No return value

More Examples

Example

Decrement the minutes by 1 (default):

document.getElementById("myLocalDate").stepDown();
Try it yourself »

Input DatetimeLocal Object Reference Input DatetimeLocal Object