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

Method
stepUp() Yes 12.0 Not supported Yes Yes

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


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