Overview
Theapp-month-calendar component is a low-level calendar grid that displays a single month view. It’s used internally by app-date-picker but can also be used standalone for custom implementations.
Installation
Import
Usage
This is a low-level component. Most use cases should use app-date-picker instead.
Properties
Calendar data object containing all necessary information to render the month view.
Async query for the currently selected calendar day element.
Events
date-updated
Fires when a date is selected (clicked or via keyboard).CSS Shadow Parts
Available Parts
calendar- Main calendar containertable- Calendar table elementcaption- Month/year caption (if shown)weekdays- Weekday headers rowweekday- Individual weekday headerweekday-value- Weekday text contentweek-number- Week number cellscalendar-day- Calendar day cellstoday- Today’s date cell
Keyboard Navigation
- Arrow Up - Previous week (same day)
- Arrow Down - Next week (same day)
- Arrow Left - Previous day
- Arrow Right - Next day
- Home - First day of current week
- End - Last day of current week
- Page Up - Previous month (same day)
- Page Down - Next month (same day)
- Alt + Page Up - Previous year (same day)
- Alt + Page Down - Next year (same day)
- Enter / Space - Select focused date
Methods
Protected method for rendering individual calendar day cells. Can be overridden for customization.
Example: Custom Calendar
TypeScript
Behavior Notes
- The component uses
delegatesFocus: truefor better keyboard accessibility - Only updates when
dataanddata.formattersare both set - Automatically focuses the selected date when navigating with keyboard
- Prevents event propagation to work properly within dialogs
- Handles disabled dates and days by preventing selection
- Supports right-to-left (RTL) layouts automatically