Black Lives Matter! ✊🏾

type="date"

The input element represents a control for setting the element’s value to a string representing a specific date. 4.10.5.1.7. Date state (type=date)

Links about type="date"

  1. Is input type=“date” ready for use in accessible websites? - Hassell Inclusion

    posted on

    One of the ‘new’ HTML5 elements - input type=“date” - was intended to simplify the collection of dates on websites, and to reduce user errors whilst doing so. So is it well supported? And does using it help make forms more accessible? We took date inputs for a test drive with different browsers and …

  2. <input type=“date”>

    posted on by MDN

    input elements of type=“date” create input fields that let the user enter a date, either with a textbox that validates the input or a special date picker interface.

Code sample

<label for="start">Start date:</label>
<input type="date" id="start" name="start">