apps/mantine.dev/src/pages/schedule/year-view.mdx
import { YearViewDemos } from '@docs/demos'; import { Layout } from '@/layout'; import { MDX_DATA } from '@/mdx';
export default Layout(MDX_DATA.YearView);
YearView displays all 12 months of a year in a grid layout. Event indicators are shown as colored dots in day cells.
<Demo data={YearViewDemos.usage} />Set withWeekNumbers to display week numbers in the first column of each month.
Set withWeekDays={false} to hide the weekday names row in each month.
Set withOutsideDays={false} to hide days from adjacent months.
Set firstDayOfWeek to control which day starts the week.
Use weekdayFormat prop to customize weekday names.
Set highlightToday={false} to disable highlighting the current day.
Set withHeader={false} to hide the header controls.
You can build a custom header using ScheduleHeader compound components combined with your own controls.
Set withHeader={false} on the view and compose the header externally.
YearView automatically expands recurring events for the visible year. See Recurring events guide for full documentation.
<Demo data={YearViewDemos.recurringEvents} />Set mode="static" to disable all interactions.
Use locale prop to set the dayjs locale for date formatting.
Combine it with labels prop to translate all UI text.
YearView uses @container queries for responsive styles. The component automatically adjusts its layout based on the container width, hiding labels and reducing padding on smaller screens. Container queries are supported in all modern browsers.
In the YearView component, focus is managed to provide an efficient keyboard navigation experience:
tabIndex={0})tabIndex={-1} and can only be reached via arrow key navigationThis approach reduces the number of tab stops when navigating through the calendar, making it faster for keyboard users to move between months while still allowing full access to all days via arrow keys.
Note that the following events will only trigger if focus is on a day control.
<KeyboardEventsTable data={[ { key: 'ArrowRight', description: 'Focuses next non-disabled day', }, { key: 'ArrowLeft', description: 'Focuses previous non-disabled day', }, { key: 'ArrowDown', description: 'Focuses same day in the next week (moves to next month if at end of month)', }, { key: 'ArrowUp', description: 'Focuses same day in the previous week (moves to previous month if at start)', }, ]} />
Each day button has an aria-label attribute with the full date in the format "Month Day, Year" (e.g., "November 15, 2025"). This provides screen reader users with complete date information.