Date Picker
Chooses a date from a calendar or by typing.
- Status
- ReadyBuild day 17 of 21
- Code
- In React
- Role
- Form
Usage
This demo is live, and the code below it is the same code, imports included. The component lives in src/ui of this repository and is not published to npm yet.
Format DD MMM YYYY
Pastes as editable layers. Shadows are not exported.
import { useState } from "react";
import { DatePicker } from "@/ui";
export default function DatePickerDemo() {
const [date, setDate] = useState<Date | null>(null);
return <DatePicker label="Due date" value={date} onChange={setDate} hint="Format DD MMM YYYY" />;
}Variants and states
Every specimen is the real component from src/ui, held in one state.
September 2026
September 2026
Choose a date
Pastes as editable layers. Shadows are not exported.
Props
- label
- string · default none
- Required.
- mode
- "single" | "range" · default "single"
- value, onChange
- Date or [Date, Date | null] · default none
- Controlled.
- defaultValue
- Date or [Date, Date | null] · default none
- today
- Date · default none
- For the outline. Pass it from the server to avoid a mismatch.
- hint, error
- string · default none
- placeholder
- string · default "Select date"
- disabled
- boolean · default none
- Calendar
- component · default none
- The month grid on its own.
Figma to code
Figma properties by their exact names from Naming, and the React prop that carries each one. The table covers the shared properties that bear on this component; the Figma file decides which of them its component exposes. None means there is no prop for it yet.
- Calendar · Mode
- mode
- single or range.
- 🎯 State
- value, error, disabled
- Focused is the open calendar.
- Label, Helper Text, Placeholder
- label, hint, placeholder
- Same.
- Change Icon Left
- None
- No prop. The calendar icon is fixed.
Accessibility
What the code in src/ui does today, and what it leaves to you.
Keyboard
- The field opens the calendar. In the grid, arrows move a day or a week, Page Up and Page Down a month, Home and End the week, Enter picks. Escape closes and returns focus.
Screen readers
- The grid is a role=grid named by the month. Each day is named in full, such as Jumat, 18 September 2026. Today has aria-current=date.
What you still need to do
- Dates show in id-ID format. If people type dates, add a text input next to it.
- Each day is 44px tall. On a screen narrower than about 400px the seven columns share the width, so a day can be 35 to 39px wide. Give the calendar the full width of the screen on phones.
When to use
Scheduling and date filters. Let people type the date as well.
Do and don't
Do
- Show the expected format, such as DD/MM/YYYY.
- Disable dates that cannot be chosen and say why.
Don't
- Force a calendar for dates far in the past, like a birth date.
- Mix date formats in the same product.
Related
4 of 28 other molecules, same role and ready ones first.
- Amount InputAn input for money that formats the value as the user types.Ready
- ComboboxAn input that suggests matching options as the user types.Ready
- File InputLets people choose or drop a file to upload.Ready
- InputA field for entering short text, numbers, or other data.Ready
Status reflects the component tracker snapshot of 29 October 2026.