Input Week stepDown() method

Definition and usage

stepDown() The method decreases the value of the week field by the specified number.

This method only affects the week (not the year).

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

Instance

Example 1

Decrease the value of the week field by 10 weeks:

document.getElementById("myWeek").stepDown(10);

Try it yourself

Example 2

Decrease the week number by 1 (default):

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

Try it yourself

Syntax

weekObject.stepDown(number)

Parameter value

Parameter Description
number

Required. Specifies the number of weeks to decrease the week field.

If omitted, the week number is decreased 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

Note:In Safari, you must enter the week field and then decrease the value.