HTML - <input type="date">

The HTML <input type="date"> element is a specific version of the <input> element used to create an input field accepting a date.

Example

 

To create a widget to display a date, use:

HTML
<input type="date">

Fix me: Insert Browser Compatibility and specification tables here.

Description  

The HTML <input type="date"> element is a specific version of the <input> element used to create an input field accepting a date.

Browsers generate a control for entering, and changing, the date. This date includes a year, month and day. The control itself varies from one browser to another; browsers not supporting this type will display a simple text control.

Content categories Flow content, listed, submittable, resettable, form-associated element, phrasing content, labellable element, palpable content.
Permitted content None, it is an empty element.
Tag omission Must have a start tag and must not have an end tag.
Permitted parent elements Any element that accepts phrasing content.
DOM interface HTMLInputElement

See Also  

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/html/element/input/date

Element HTML Input Element NeedsCompatTable Reference