HTML <input type="date">
Example
Show a date control:
<label for="birthday">Birthday:</label>
<input type="date"
id="birthday" name="birthday">
Try it Yourself »
Definition and Usage
The <input type="date">
defines a date picker.
The resulting value includes the year, month, and day.
Tip: Always add the <label>
tag
for best accessibility practices!
Browser Support
The numbers in the table specify the first browser version that fully supports the element.
Attribute | |||||
---|---|---|---|---|---|
type="date" | 20.0 | 12.0 | 57.0 | 14.1 | 11.0 |
Syntax
<input type="date">