Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<input type="date" id="myDate" value="2000-05-05">
<p>Click the button to display the default value of the date field.</p>
<button onclick="myFunction()">Try it</button>
<p><strong>Note:</strong> input elements with type="date" do not show as any date field/calendar in IE 11 and earlier versions.</p>
<p id="demo"></p>
<script>
function myFunction() {
  var x = document.getElementById("myDate").defaultValue;
  document.getElementById("demo").innerHTML = x;
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_input_date_defaultvalue2 by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 18:16:54 GMT -->
</html>