Input Date max Property - Change the maximum date: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Date

Description

Input Date max Property - Change the maximum date:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>
Date:/*from   ww w  .ja  v  a2  s. c  o m*/
<input type="date" id="myDate" name="bday" min="1980-01-01" max="2000-01-01">


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

<p id="demo"></p>

<script>
function myFunction() {
    var x = document.getElementById("myDate").max;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

Related Tutorials