DatePicker
Choose a date in a dialog and submit its ISO value with a form.
alpina-ui/swiss/date-pickerUsage notes
Pass canton and an optional holidayRegion to highlight holidays in the dialog. All dates within min and max remain selectable. The clear action updates the submitted value and restores trigger focus.
When to use
Choose one nearby date in a form where opening a calendar helps people see weekdays and availability.
When to avoid
Use SwissDate to display an existing deadline in a read-only summary.
Accessibility
Label the trigger with the purpose of the date. Verify focus returns after a keyboard selection or Escape and the chosen date remains discernible.
| Key | Action |
|---|---|
| Enter / Space | Open the picker. Activate a focused day to select it. |
| ← / → | Move one day in the calendar grid. |
| ↑ / ↓ | Move one week. |
| Home / End | Move to the start or end of the week. |
| Page Up / Page Down | Move one month. Add Shift to move a year. |
| Escape | Dismiss the calendar and return focus to its trigger. |
Content
Use a brief noun phrase naming the date’s role. Keep any booking restriction in a separate hint.
- Use
- Delivery date
- Avoid
- Select a value
Copy in four languages
- German
- Lieferdatum11 characters
- French
- Date de livraison17 characters
- Italian
- Data di consegna16 characters
- Romansh
- Data da furniziun17 characters
npx --no-install alpina add date-picker