Calendar
Show a month of days and let the user pick one, in the app's language.
For a form field that opens a calendar in a sheet, use Date Picker.
Installation
Usage
- Tapping a day sets
valueto that day at local midnight, and emitschanged. - It opens at the month of
value, or today's month whilevalueis null. - The arrows page through the months.
- Today has a ring. The chosen day is filled.
Jump to another month or year
Tap the title to see the year's months. Tap it again to see a list of years.
- Tap a year to see its months, then a month to see its days.
- Among the months, the arrows page through the years.
- So a birthday decades back takes five taps: title, title, year, month, day.
Limit the days
- Days before
minor aftermaxare faded, and tapping them does nothing. - The arrows stop at the first and last months in range, and the calendar opens inside it.
- Only the day counts: the time of day in
minandmaxis ignored.
Start the week on another day
0 is Sunday and 6 is Saturday. Without weekStartsOn, the week starts where the locale says: Sunday in en-US, Monday in most of Europe.
Languages
The calendar writes every word from Angular's LOCALE_ID: the title, the weekdays and what screen readers say for each day. Set LOCALE_ID with provideLocale(), and register each language's data with registerLocaleData(). It doesn't need the intl build option.
The title follows the locale's own order: November 2026 in English, 2026年11月 in Japanese.
The arrows' screen reader labels are inputs. Mark them for translation like any other attribute:
API
Weekday, the type of weekStartsOn, is exported too.
Accessibility
- Each day is a button named by its whole date, such as "Wednesday, November 11, 2026". The chosen day is
selected. - Days outside
minandmax, and arrows that lead nowhere, are dimmed to VoiceOver as well. - The weekday initials are hidden: each day says its weekday.
- The title is a button named by what it shows. It stays the same element as the view changes, so focus stays on it.
- Every control is a touch target at least 48px each way, which meets Android's 48dp and iOS's 44pt. A day is a seventh of the calendar's width, so give the calendar at least 336px.
So a spec finds the days by role:
Related
- Date Picker: a field that opens a calendar in a sheet
- Internationalization
