# Date Picker
> Date input with calendar popup for date selection
Source: https://shellui.dev/docs/v0.4/components/advanced/date-picker
The DatePicker component combines a button trigger with a calendar popup for selecting dates. It supports two-way binding, placeholder text, clear functionality, and disabled state.
## Installation
```bash
shellui add date-picker
```
## Basic Usage
```razor
@code {
private DateTime? selectedDate;
}
```
## Side-by-Side Date Range
Use two DatePicker components for a date range:
```razor
to
@code {
private DateTime? startDate;
private DateTime? endDate;
}
```
## API Reference
| Property | Type | Default | Description |
|----------|------|---------|-------------|
| `Value` | `DateTime?` | `null` | Selected date value |
| `ValueChanged` | `EventCallback` | — | Two-way binding callback |
| `Placeholder` | `string` | `"Pick a date"` | Text shown when no date is selected |
| `Disabled` | `bool` | `false` | Disable the date picker |
| `AllowClear` | `bool` | `true` | Show a clear button when a date is selected |
| `CloseOnScroll` | `bool` | `false` | Close the calendar when the page scrolls |
| `SelectedDate` / `SelectedDateChanged` | `DateTime?` | `null` | Deprecated: use `Value` / `@bind-Value`; `shellui migrate date-picker` rewrites it |
| `Class` | `string?` | `null` | Additional CSS classes |
## Display Format
The selected date is displayed as **"MMM dd, yyyy"** (e.g., "Feb 08, 2026"). The calendar popup provides month navigation with Previous/Next buttons.
## Accessibility
The DatePicker component includes:
- Calendar popup as an overlay with click-outside dismiss
- Keyboard navigation within the calendar grid
- Month navigation via Previous/Next buttons
- Clear button with proper labeling
- `aria-label` on the trigger button