Tryit Editor v2.3

Edit This Code:
<!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" are not supported in any of the major browsers, except partially in 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> <!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_datetime_min2 by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:32:39 GMT --> </html>
Result:
Try it Yourself - © w3schools.com