Input Week max Property - Change the maximum week and year allowed: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Week

Description

Input Week max Property - Change the maximum week and year allowed:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

Week and Year:/*from  w  w w . j  a  v a 2  s .c o  m*/
<input type="week" id="myWeek" min="2018-W12" max="2018-W19">

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

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

<script>
function myFunction() {
    document.getElementById("myWeek").max = "2018-W35";
    document.getElementById("demo").innerHTML = "changed";
}
</script>

</body>
</html>

Related Tutorials