Date & Time Fields
Live example
Date & Time Fields
Installation
npx shadcn@latest add https://hextech-ui.vercel.app/r/date-field.jsonAPI reference
These are the main Date & Time Fields options. See the exported TypeScript types for inherited native or primitive props.
| Prop | Type | Default |
|---|---|---|
label | string (required) | — |
value / defaultValue | ISO date or local HH:mm string | — |
validationMessage | string | — |
Dates and times
DateField uses ISO day strings; TimeField uses HH:mm strings. Native segment appearance follows the browser and locale. Use value and onValueChange for controlled editing. Supply validationMessage for an external error; keep the visible label and description.