THE WORLD'S LARGEST WEB DEVELOPER SITE

Input Month stepUp() Method

❮ Input Month Object

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

Method
stepUp() Yes 12.0 Not supported Yes Yes

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