THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Input Week stepUp() Method

Input Week Object Reference Input Week Object

Example

Increment the value of a week field by 10 weeks:

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

Definition and Usage

The stepUp() method increments the value of the week field by a specified number.

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

Tip: To decrement the value, use the stepDown() method.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The stepUp() 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 increment the value.

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


Syntax

weekObject.stepUp(number)

Parameter Values

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

If omitted, the weeks are incremented by "1"

Technical Details

Return Value: No return value

More Examples

Example

Increment the weeks by 1 (default):

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

Input Week Object Reference Input Week Object