<input type="date">

INPUT Date Description:

The date INPUT tag gives you a way to request dates in your web form. The date will be collected with the year, month, and day with no time zone. The browser or user agent should display a calendar or other date control input device to allow users to submit dates.


INPUT Date Web Browser Support:

At this time, only Opera 9+ supports the INPUT date type with a calendar (see screen shot above).

All other browsers display a text box. You can still use this input type, you will just have to validate that the contents are a date with a script or CGI.

HTML Versions

INPUT Date Attributes:

Global attributes, event attributes, and the input tag attributes. Plus:

  • autocomplete
  • list
  • max
  • min
  • readonly
  • required
  • step
  • valueAsNumber
  • selectedOption
  • stepDown()
  • stepUp()

INPUT Date Usage:

Standard date input tag


See an example of a standard date input tag.

INPUT Date Special Notes:

The input date tag is only supported in Opera 9+ if you want a calendar displayed, but you can still use this input type and validate that the submitted data is a date. That way, when other browsers do start supporting it, your forms won't have to be modified.

More INPUT Date Information:

mla apa chicago
Your Citation
Kyrnin, Jennifer. "<input type="date">." ThoughtCo, May. 2, 2017, thoughtco.com/input-type-date-3468034. Kyrnin, Jennifer. (2017, May 2). <input type="date">. Retrieved from https://www.thoughtco.com/input-type-date-3468034 Kyrnin, Jennifer. "<input type="date">." ThoughtCo. https://www.thoughtco.com/input-type-date-3468034 (accessed January 20, 2018).