THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML <input type="datetime-local">

❮ HTML <input> type attribute

Example

Show a date and time control (no timezone) :

Birthday (date and time): <input type="datetime-local" name="bdaytime">
Try it Yourself »

Definition and Usage

The <input type="datetime-local"> defines a date picker.

The resulting value includes the year, month, day, and time.


Browser Support

The numbers in the table specify the first browser version that fully supports the element.

Attribute
type="datetime-local" 20.0 13.0 Not supported Not supported 10.1

Syntax

<input type="datetime-local">

❮ HTML <input> type attribute