Design system/Components
Date and time pickers
DateField opens the Solar Hijri calendar as a floating field, and TimeField opens two columns for hours and minutes. Both use the same floating panel and the same phone sheet.
In codecomponents/date-picker.tsxcomponents/time-picker.tsx
Live example
Pick a date and set a time. The date value is always ISO (yyyy-mm-dd) and the time is HH:MM; it's the display that becomes Solar Hijri and localized.
Behavior
- The calendar opens to the month of the selected date, or the current month.
- The month arrow row is written for right-to-left, and in left-to-right the whole row is mirrored, not each icon individually.
- The hour and minute columns scroll the current value into view when they open; otherwise a meeting at 18:00 would open at midnight and look empty.
- Minutes move in steps; 5 minutes by default.
Rules
Do
Store the value as ISO and format it for display.
Don't
Storing a Solar Hijri string; comparing and sorting break.
Do
formatPublicDate on public pages.
Don't
formatJalali on a page with international readers.
<DateField label={tr("موعد")} value={due} onChange={setDue} />
<TimeField label={tr("ساعت")} value={time} onChange={setTime} minuteStep={15} />Size and panel
Field
58px · 16px / 500The same floating fieldTime chip
.select-chip-time · min-width 86pxPanel
Floating · z-index 1280Phone
.sheet-menu · max-height 72vhDo
minuteStep sized to the task: 5 for meetings, 15 for due times.
Don't
60 minute rows to scroll through.
Related pages