
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
HTML DOM Input Date min Property
The HTML DOM Input Date min property returns/sets min attribute of Input date type.
Syntax
Following is the syntax −
- Returning string value
inputDateObject.min
- Setting min to string value
inputDateObject.min = YYYY-MM-DD
String Values
Here, “YYYY-MM-DD” can be the following −
stringValue | Details |
---|---|
YYYY | It defines year (eg:1998) |
MM | It defines month (eg: 05 for May) |
DD | It defines Day (eg: 24) |
Example
Let us see an example of Input Date min property −
<!DOCTYPE html> <html> <head> <title>Input Date Min</title> </head> <body> <form> Date Select: <input type="date" id="date" name="DateSelect" min="2000-01-01"> </form> <button onclick="getMinDate()">Change Min Date</button> <div id="divDisplay"></div> <script> var inputDate = document.getElementById("date"); var divDisplay = document.getElementById("divDisplay"); divDisplay.textContent = 'Min of date input: '+inputDate.min; function getMinDate() { var oldInputDate = inputDate.max; inputDate.min = '1998-07-01'; divDisplay.textContent = 'Min of date input: '+inputDate.min; } </script> </body> </html>
Output
This will produce the following output −
Before clicking ‘Change Min Date’ button −
After clicking ‘Change Min Date’ button −
- Related Articles
- HTML DOM Input Month min Property
- HTML DOM Input Number min Property
- HTML DOM Input Range min property
- HTML DOM Input Datetime min Property
- HTML DOM Input DatetimeLocal min Property
- HTML DOM Input Time min Property
- HTML DOM Input Week min Property
- HTML DOM Input Date autofocus Property
- HTML DOM Input Date disabled Property
- HTML DOM Input Date form Property
- HTML DOM Input Date name Property
- HTML DOM Input Date max Property
- HTML DOM Input Date readOnly Property
- HTML DOM Input Date required Property
- HTML DOM Input Date step Property

Advertisements