Date field
Native date, time, month and datetime entry on the shared control surface.
Live preview
Source
The exact file rendered in the preview above.
components/demos/date-field.tsx
components/ui/date-field.tsx
Demo source — adapt to your project. Foundry is not published as a package.
Usage
Native on purpose. A custom picker means re-implementing locale formats, keyboard grids and screen-reader announcements — and losing the platform picker on mobile. Foundry adds chrome, nothing else.
- Values are always ISO (`YYYY-MM-DD`); display formatting is the browser’s job.
- Use `min` and `max` to express real constraints rather than validating after submission.
- For a date range, use two fields and validate the relationship between them.
Variants and states
Every entry below is a genuine difference in behaviour or layout, and every one of them is visible in the preview above.
- Date
- Time
- Datetime
- Month
- Invalid
- Disabled
Accessibility
- Platform behaviour
- Segment-by-segment keyboard editing and the mobile picker come from the native control.
- Decoration
- The calendar icon is hidden on engines that draw their own indicator, so the two never collide.
Foundry implements published ARIA patterns and is tested against them. No WCAG certification is claimed — see the accessibility documentation for what is and is not covered.
Related
All componentsInput
Single-line text entry with leading and trailing slots, three sizes and a shared control surface used by every other text control.
starter7 variantsBooking wizard
Party size, then availability, then contact — with unavailable slots shown rather than hidden.
advancedFeatured4 variantsField
The accessibility contract shared by every form control — label, help text, error, success and the ARIA wiring that connects them.
intermediateFeatured7 variants