
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML DOM Input Date Step Property
The HTML DOM Input Date step property determines the legal day intervals to choose from when user opens the calendar. It sets or returns the input date step attribute value.
Syntax
Following is the syntax −
- Returning number value
inputDateObject.step
- Setting value attribute to a number value
inputDateObject.step = number
Example
Let us see an example of Input Date step property −
<!DOCTYPE html> <html> <head> <title>Input Date required</title> </head> <body> <form> <div> Odd Days Calendar: <input type="date" id="dateSelect" step="2"> </div> </form> <div id="divDisplay"></div> <script> var divDisplay = document.getElementById("divDisplay"); var inputDate = document.getElementById("dateSelect"); divDisplay.textContent = 'Current step: '+inputDate.step; </script> </body> </html>
Output
This will produce the following output. Here, step was set to 2 −
Advertisements