<!DOCTYPE html>
<html>
<body>
Date and time:
<input type="datetime" id="myDatetime" min="2000-01-01T22:57Z" max="2014-02-06T22:57Z">
<p>Click the button to change the value of the min attribute of the datetime field.</p>
<button onclick="myFunction()">Try it</button>
<p><strong>Note:</strong> input elements with type="datetime" do not show as any datetime field/calendar in any of the major browsers, except Safari.</p>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("myDatetime").min = "2010-01-01T21:57Z";
document.getElementById("demo").innerHTML = "The value of the min attribute was changed from '2000-01-01T22:57Z' to '2010-01-01T21:57Z'.";
}
</script>
</body>
</html>