Input DatetimeLocal min Property - Change the minimum date and time: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Datetime Local

Description

Input DatetimeLocal min Property - Change the minimum date and time:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

Date and time://from  w w  w .ja  va 2 s  .  c  o m
<input type="datetime-local" id="myLocalDate" min="2000-10-06T22:22:55" max="2018-11-16T21:25:33">

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

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

<script>
function myFunction() {
    document.getElementById("myLocalDate").min = "2006-05-05T16:15:23";
    document.getElementById("demo").innerHTML = "changed from '2000-10-06T22:22:55' to '2006-05-05T16:15:23'.";
}
</script>
</body>
</html>

Related Tutorials