DatePicker
MS-DOS inspired calendar interface for date selection.
Import
Basic Usage
2026 JANUARY
Su
Mo
Tu
We
Th
Fr
Sa
Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | Date | — | Selected date value (controlled) |
defaultValue | Date | — | Default selected date (uncontrolled) |
onValueChange | (date: Date) => void | — | Callback when date changes |
minDate | Date | — | Minimum selectable date |
maxDate | Date | — | Maximum selectable date |
label | string | — | Label text for the date picker |
className | string | — | Additional CSS class names |
With Label
Select Date
2026 JANUARY
Su
Mo
Tu
We
Th
Fr
Sa
Default Value
Birth Date
1990 JANUARY
Su
Mo
Tu
We
Th
Fr
Sa
Date Constraints
Restrict selectable dates with minDate and maxDate:
Future dates only
2026 JANUARY
Su
Mo
Tu
We
Th
Fr
Sa
Past dates only
2026 JANUARY
Su
Mo
Tu
We
Th
Fr
Sa
Next 30 days
2026 JANUARY
Su
Mo
Tu
We
Th
Fr
Sa
Controlled DatePicker
Event Date
2026 JANUARY
Su
Mo
Tu
We
Th
Fr
Sa
Selected: (none)
Date Range Selection
Start Date
2026 JANUARY
Su
Mo
Tu
We
Th
Fr
Sa
End Date
2026 JANUARY
Su
Mo
Tu
We
Th
Fr
Sa
Start: (none)
End: (none)
Booking Example
Check-in
2026 JANUARY
Su
Mo
Tu
We
Th
Fr
Sa
Check-out
2026 JANUARY
Su
Mo
Tu
We
Th
Fr
Sa
Check-in: (none)
Check-out: (none)
Features
- Calendar grid: 7-column week layout (Su Mo Tu We Th Fr Sa)
- Month/year navigation: Arrow buttons for previous/next month and year
- Visual indicators: Today's date and selected date highlighted
- Date constraints: Optional min/max date restrictions
- Keyboard navigation: Full keyboard support
Keyboard Navigation
| Key | Action |
|---|---|
Arrow Left | Previous day |
Arrow Right | Next day |
Arrow Up | Previous week |
Arrow Down | Next week |
Home | First day of month |
End | Last day of month |
Page Up | Previous month |
Shift + Page Up | Previous year |
Page Down | Next month |
Shift + Page Down | Next year |
Enter / Space | Select focused date |
Visual Design
The calendar uses MS-DOS inspired styling:
- Navigation:
<<<YEAR MONTH>>> - Day headers:
Su Mo Tu We Th Fr Sa - Days displayed as two-digit numbers (
01,15, etc.) - Selected date inverted (dark on light)
- Today's date underlined
Accessibility
- Proper grid ARIA attributes
- Screen reader support for date selection
- Full keyboard navigation
- Focus management within calendar
Styling
| Variable | Description |
|---|---|
--theme-border | Calendar border |
--theme-background | Calendar background |
--theme-text | Day text color |
--theme-button | Selected day background |
--theme-focused-border | Focus outline |