Date Picker
A date near today, like a due date or settlement, typed in the locale's format or picked from the calendar the icon opens, in the same box and states as Input. Built on ui-sdk's Date Picker: a typed date commits on Enter or blur, and the value is an ISO date.
BetaReady to use. Its API can still change in a minor release; the changelog says when.
import { DatePicker, DateRangePicker, Field } from "@leap-crm/design-system";Playground
Change a prop and the component follows. Its code is under Props.
Props
Best practices
When to use it, and the rules that apply in particular places.
| Guidance | Practice |
|---|---|
| Do | Use it for dates near today, like a due date, a settlement or a follow-up, where seeing the week around the date helps. |
| Do | Use DateRangePicker with presets for reporting windows, like this month or the last 30 days, so the common range is one click. |
| Do | Set clearable when the date is optional, so a lawyer can remove it without typing over it. |
| Don't | Use it for a date of birth, an incorporation date or a date read off a document. Use DateInput: typing the date is faster than paging back decades. |
| Don't | Put two date pickers side by side for a start and an end. Use DateRangePicker, which keeps the end after the start. |
Props
Also takes ui-sdk's Date Picker options: value, defaultValue, onValueChange, min, max, unavailable, locale, open, onOpenChange, closeOnSelect, name, required, disabled and readOnly.
DatePicker
| Prop | Type | Default | Description |
|---|---|---|---|
| size | TextSize | "md" | xs 28, sm 32, md 36 (forms, the default), lg 40, as Input. |
| placeholder | string | — | Shown while the field is empty. The locale's own pattern, like dd/mm/yyyy, when left out. |
| clearable | boolean | false | Shows a × that empties the field. |
| aria-label | string | — | Names the field outside a Field. |
| id | string | — | The control's id, for a label's htmlFor or aria-describedby. |
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
DateRangePicker
| Prop | Type | Default | Description |
|---|---|---|---|
| value | DateRange | null | — | The range as [start, end] ISO dates, or null. Pass it to control the picker. |
| defaultValue | DateRange | null | — | The range it starts with, as two ISO dates, when it controls itself. |
| onValueChange | (value: DateRange | null) => void | — | Runs once both ends are set, or with null when cleared. |
| presets | DateRangePreset[] | — | Ranges one press away, listed beside the calendar, like "Last 7 days". |
| size | TextSize | "md" | xs 28, sm 32, md 36 (forms, the default), lg 40, as Input. |
| placeholder | string | — | Shown in each empty input. The locale's own pattern when left out. |
| clearable | boolean | false | Shows a × that empties the field. |
| aria-label | string | — | Names the range outside a Field: the inputs read "<label>, start" and "<label>, end". |
| id | string | — | The control's id, for a label's htmlFor or aria-describedby. |
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
Code
What the playground shows, ready to copy.
import { DatePicker } from "@leap-crm/design-system";
<DatePicker aria-label="Due date" />In a field
Type 12/12/2026 or press the calendar. The locale decides the order: en-AU reads day first. For a date people know by heart, like a date of birth, use Date Input: no calendar to page back through.
When the funds change hands.
States
Range
DateRangePicker: the start, a dash and the end in one field. Pick the start in the calendar, then the end; the band fills between them. The value is [start, end] and changes once both are set.
Range with presets
presets lists ranges one press away beside the calendar; the matching one shows as selected.
What the examples share
The imports and the scaffolding the examples above call. The scaffolding lives in this page, not in the library.
import { Fragment } from "react";
import { DatePicker, DateRangePicker, Field } from "@leap-crm/design-system";
const sizes = ["xs", "sm", "md", "lg"] as const;Keyboard
The keys it answers to. Tab moves between components, arrows move within them.
| Keys | What they do |
|---|---|
| Enter | Makes a date typed in the page's format the value. |
| EnterSpace | On the calendar button, opens the calendar with focus on the selected date. |
| Arrow keys | Move by day and by week in the open calendar. |
| Escape | Closes the calendar and returns focus to its button. |





