Input Month stepDown() Method
Example
Decrement the value of a month field by 3 months:
document.getElementById("myMonth").stepDown(3);
Try it yourself »
Definition and Usage
The stepDown() method decrements the value of the month field by a specified number.
This method will only have an affect on MONTHS (not years).
Tip: To increment the value, use the stepUp() method.
Browser Support
The stepDown() method is supported in all major browsers, except Internet Explorer.
Note: In Safari, you must enter a month in the month field before you can decrement the value.
Note: <input> elements with type="month" are not
supported in Internet Explorer or Firefox.
Syntax
numberObject.stepDown(number)
Parameter Values
Parameter | Description |
---|---|
number | Required. Specifies the amount of months the month field should
decrease. If omitted, the months are decremented by "1" |
Technical Details
Return Value: | No return value |
---|
More Examples
Example
Decrement the value of a month field by 1 (default):
document.getElementById("myMonth").stepDown();
Try it yourself »
Input Month Object