Input Date stepUp() Method

Definition and Usage

stepUp() The method increases the value of the date field by the specified number.

This method only affects the day (and not the month and year).

Tip:If you need to decrease the value, please use stepDown() Method.

Instance

Example 1

Increase the value of the date field by 5 days:

document.getElementById("myDate").stepUp(5);

Try It Yourself

Example 2

Increase the number of days by 1 (default):

document.getElementById("myDate").stepUp();

Try It Yourself

Syntax

inputdateObject.stepUp(number)

Parameter Value

Parameter Description
number

Required. Specifies the number of days to be added to the date field.

If omitted, the number of days is increased by "1".

Technical Details

Return Value:

No Return Value.

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support 12.0 17.0 Support Support