Input Date stepDown() Method - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Date


The stepDown() method decrements the days of the date field by a number.

Parameter Values

Parameter Description
numberRequired. amount of days the date field should decrease.If omitted, the days are decremented by 1

Return Value:

No return value

The following code shows how to Decrement the value of a date field by 5 days:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
Date: <input type="date" id="myDate" value="2014-05-05">

<button onclick="myFunction()">Test</button>

function myFunction() {//from   w w w  .  j  a  va2  s  .c om


Related Tutorials