input type="datetime"

The old <input type="datetime"> type was intended to collect a date and time in UTC. It is obsolete and should not be chosen for new forms.

What you will learn

Historical syntax

<!-- Do not use this obsolete type for a new form. -->
<input type="datetime" name="meeting">

Support for this type was removed or never implemented consistently across browsers. A browser may treat it as a plain text input, so the expected UTC picker and value format cannot be relied on.

What to use instead

If an application needs a moment in time, document the time zone clearly and normalize the submitted value on the server. Always provide a visible label and validate the received value.

Related pages