Input Date stepDown() Method - Decrement the days by 1 (default): - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Date

Description

Input Date stepDown() Method - Decrement the days by 1 (default):

Demo Code

ResultView the demo in separate window

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

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

<script>
function myFunction() {/*w w w .j  a  v a2 s  .co  m*/
    document.getElementById("myDate").stepDown();
}
</script>

</body>
</html>

Related Tutorials