Ask Natuna

Ask about the design system

Hi, I am Natuna.

Ask me about the design system: components, tokens, statuses, and how to use them.

Natuna can be wrong. The docs are the source of truth.

Skip to content
  • IntroductionPage
  • Ask NatunaAsk about the design systemPage
  • FoundationColor, type, number, effectPage
  • Components overviewPage
  • ThemesLight and dark modePage
  • NamingProperty and page namesPage
  • Privacy statementPage
  • Text-safe stepsFirst AA and AAA step per color rampSection
  • AccessibilityWCAG 2.2 AAA rulesSection
  • Dark modeThemesSection
  • Using it todayFigma file and React codeSection
  • Component statusDesign status and In ReactSection

Arrow keys to move, Enter to open, Esc to close.

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.

Due date

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.

Calendar single13 Sep is today, 18 Sep is picked

September 2026

SSRKJSM
Calendar range18 to 24 Sep

September 2026

SSRKJSM
Default
Date
Filled
Date
Range filled
Date
Error
Date

Choose a date

Disabled
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.

4 of 28 other molecules, same role and ready ones first.

See all components

Status reflects the component tracker snapshot of 29 October 2026.