Example

A simple <input> tag with datetime-local attribute:

Laboratory

description & Usage

The <input type="datetime-local"> attribute displays the datetime picker.

The selected value includes year, month, day, hour and minute.

Notes

Browser compatibility and Support

# Chrome Edge Firefox Safari Opera
<input type="datetime-local">

Syntax

Attribute Values

Values Description