Form
Date input
Published on
Description
The date input provides a native date picker for selecting calendar dates. It uses type="date" which renders a platform-appropriate date picker widget.
Example
Accessibility
- Use explicit
<label for="id">association. - Use
autocomplete="bday"or the appropriate token for the date type. - Provide
minandmaxattributes to constrain the valid range. - Provide hint text describing the expected format via
aria-describedby.
References
- Under-Engineered Text Boxen (opens in new tab) — Adrian Roselli
- My Priority of Methods for Labeling a Control (opens in new tab) — Adrian Roselli
Related
- Text input — for general text
Variables
None for input