The <input type="color">
element is utilized for fields intended to capture color selections. Depending on browser capabilities, a color picker may appear within the input field.
Example
<form> <label for=”birthday”>Birthday:</label> <input type=”date” id=”birthday” name=”birthday”> </form> |
You can employ the min and max attributes to impose limitations on dates as well.
Example
<form> <label for=”datemax”>Enter a date before 1980-01-01:</label> <input type=”date” id=”datemax” name=”datemax” max=”1979-12-31″><br><br> <label for=”datemin”>Enter a date after 2000-01-01:</label> <input type=”date” id=”datemin” name=”datemin” min=”2000-01-02″> </form> |