THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Input Week stepDown() Method

Input Week Object Reference Input Week Object

Example

Decrement the value of a week field by 10 weeks:

document.getElementById("myWeek").stepDown(10);
Try it yourself »

Definition and Usage

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

This method will only have an affect on WEEKS (not years).

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


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The stepDown() method is supported in all major browsers, except Internet Explorer.

Note: In Safari, you must enter a week in the week field before you can decrement the value.

Note: <input> elements with type="week" are not supported in Internet Explorer or Firefox.


Syntax

weekObject.stepDown(number)

Parameter Values

Parameter Description
number Required. Specifies the amount of weeks the week field should decrease.

If omitted, the weeks are decremented by "1"

Technical Details

Return Value: No return value

More Examples

Example

Decrement the weeks by 1 (default):

document.getElementById("myWeek").stepDown();
Try it yourself »

Input Week Object Reference Input Week Object