DatePicker
Form field that opens a month grid to pick one date.
Pick a calendar date and a time in one field.
One field for a day and a time. The dialog has the shared header with Close, and keeps the month grid and the time together until Done, Close or Escape.
A day only is DatePicker. A time only is TimePicker. A range of days is DateRangePicker.
value is a date in YYYY-MM-DD and a time in HH:mm. Done closes the dialog. Escape does too, and returns focus to the field.
import { DateTimePicker } from "agentic-ds-kit";From contracts/datetimepicker.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| id | string | Yes | — | — |
| size | md | sm | lg | No | md | Trigger height sm 32, md 36, lg 40, like Input. The TimePicker in the panel is sm when size is sm, else md. |
| value | { date?: string, time?: string } | No | — | date is YYYY-MM-DD. time is HH:mm. |
| defaultValue | { date?: string, time?: string } | No | — | — |
| onValueChange | function | No | — | (value: { date?, time? }) => void |
| hourCycle | 12 | 24 | No | 12 | — |
| disabled | boolean | No | false | — |
| error | boolean | No | false | — |
| minDate | string | No | — | YYYY-MM-DD. Earlier days are struck through and unavailable. |
| maxDate | string | No | — | YYYY-MM-DD. Later days are struck through and unavailable. |
| name | string | No | — | Hidden input submits date and time as YYYY-MM-DDTHH:mm. |
| describedBy | string | No | — | — |
| placeholder | string | No | Pick a date and time | — |
Form field that opens a month grid to pick one date.
Pick a time of day as hour and minute, in 12-hour or 24-hour form.
Pick a date range from named presets such as This month or Last 30 days, from two months side by side, or by typing the start and end, then Apply.