Input Month stepDown() Method

Definition and Usage

stepDown() The method will decrease the value of the month field by the specified number.

This method will only affect the month (not the year).

Tip:To increase the value, please use stepUp() Method.

Instance

Example 1

Decrease the value of the month field by 3 months:

document.getElementById("myMonth").stepDown(3);

Try it yourself

Example 2

Decrease the value of the month field by 1 (default):

document.getElementById("myMonth").stepDown();

Try it yourself

Grammar

numberObject.stepDown(number)

Parameter Value

Parameter Description
number

Required. Specifies the number of months to reduce the month field.

If omitted, the month is reduced 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