Input Week min Property - Change the minimum week and year allowed: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Week

Description

Input Week min Property - Change the minimum week and year allowed:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

Week and Year://from w  w w . j av a  2  s.c  om
<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").min = "2018-W16";
    document.getElementById("demo").innerHTML = "changed";
}
</script>

</body>
</html>

Related Tutorials