Get the legal day intervals:
var x = document.getElementById("myDate").step;
Click the button to display the value of the step attribute of the date field.
<!DOCTYPE html> <html> <body> Date: <input type="date" id="myDate" step="5"> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*from w ww. j ava 2s .c o m*/ var x = document.getElementById("myDate").step; document.getElementById("demo").innerHTML = x; } </script> </body> </html>