Input Date stepDown() Method
Example
Decrement the value of a date field by 5 days:
document.getElementById("myDate").stepDown(5);
Try it Yourself »
Definition and Usage
The stepDown() method decrements the value of the date field by a specified number.
This method will only have an affect on DAYS (not month and year).
Tip: To increment the value, use the stepUp() method.
Browser Support
Method | |||||
---|---|---|---|---|---|
stepDown() | Yes | 12.0 | Not supported | Yes | Yes |
Syntax
inputdateObject.stepDown(number)
Parameter Values
Parameter | Description |
---|---|
number | Required. Specifies the amount of days the date field should
decrease. If omitted, the days are decremented by "1" |
Technical Details
Return Value: | No return value |
---|
More Examples
Example
Decrement the days by 1 (default):
document.getElementById("myDate").stepDown();
Try it Yourself »
Input Date Object