HTML - <input type="datetime">

The HTML <input type="datetime"> is a control for entering a date and time (hour, minute, second, and fraction of a second) based on the UTC time zone.

Example

input type="datetime" name="new_year"

Description  

The HTML <input type="datetime"> is a control for entering a date and time (hour, minute, second, and fraction of a second) based on the UTC time zone.

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

Browser Compatibility  

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 1.0 (1.7 or earlier) 2 1.0 1.0
type=datetime Not supported[1] Not supported[2] Not supported 10.62 (Yes)[1]
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) 4.0 (2.0) (Yes) (Yes) (Yes)
type=datetime Not supported Not supported Not supported 10.62 (Yes)

[1] The datetime type is recognized, but there is no specific UI for it.

[2] Gecko doesn't currently implement the datetime type. See bug 825294.

Specifications  

Specification Status Comment
WHATWG HTML Living Standard
The definition of '<input type="datetime">' in that specification.
Living Standard  
HTML5.1
The definition of '<input type="datetime">' in that specification.
Working Draft Initial definition

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/datetime