Input Month stepUp() Method
Example
Increment the value of a month field by 3 months:
document.getElementById("myMonth").stepUp(3);
Try it yourself »
Definition and Usage
The stepDown() method increments the value of the month field by a specified number.
This method will only have an affect on MONTHS (not years).
Tip: To decrement the value, use the stepDown() method.
Browser Support
The stepUp() 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 increment 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
increase. If omitted, the months are incremented by "1" |
Technical Details
Return Value: | No return value |
---|
More Examples
Example
Increment the value of a month field by 1 (default):
document.getElementById("myMonth").stepUp();
Try it yourself »
Input Month Object