Input Month stepUp() Method
Definition and Usage
stepDown()
The method increases the value of the month field by the specified number.
This method only affects the month (not the year).
Tip:To decrease the value, use stepDown() Method.
Instance
Example 1
Increase the value of the month field by 3 months:
document.getElementById("myMonth").stepUp(3);
Example 2
Increase the value of the month field by 1 (default):
document.getElementById("myMonth").stepUp();
Grammar
numberObject.stepDown()number)
Parameter Value
Parameter | Description |
---|---|
number |
Required. Specifies the number of months to be added to the month field. If omitted, the month is increased by "1". |
Technical Details
Return Value:
No Return Value.
Browser Support
The numbers in the table indicate the first browser version that fully supports this property.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Supported | 12.0 | Not Supported | Supported | Supported |