HTML: input type="date"
The date input lets users choose a calendar date while submitting a value in the standard YYYY-MM-DD form.
What you will learn
- How to label a date field
- How to set minimum and maximum dates
- Why the picker appearance is controlled by the browser
Minimal example
<label for="start-date">Start date</label>
<input id="start-date" name="start-date" type="date"
min="2026-01-01" max="2026-12-31" required>The picker and visible date format can vary by operating system and browser. The submitted value is normalized for the form as YYYY-MM-DD.
Common mistakes
- Do not assume every browser displays the same calendar UI; explain the expected date when it matters.
- Validate that the date is allowed for the specific user or process on the server.
- Use a date-time input when the time zone or time of day matters.