<!DOCTYPE html>
<html>
<body>
<input type="date" id="myDate" autofocus>
<p>Click the button to find out if the date field automatically gets focus when the page loads.</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 Firefox.</p>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("myDate").autofocus;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>