THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML <input type="date">

❮ HTML <input> type attribute

Example

Show a date control:

<label for="birthday">Birthday:</label>
<input type="date" id="birthday" name="birthday">
Try it Yourself »

Definition and Usage

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

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

Tip: Always add the <label> tag for best accessibility practices!


Browser Support

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

Attribute
type="date" 20.0 12.0 57.0 Not supported 10.1

Syntax

<input type="date">

❮ HTML <input> type attribute