Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

docs(useCalendarNavigation): add hook docs and a month pager example block (#10154)

Utkarsh patwa8091fbc64ba4
diff --git a/.changeset/hook-doc-use-calendar-navigation.md b/.changeset/hook-doc-use-calendar-navigation.md
new file mode 100644
index 0000000000..227a2eaf93
--- /dev/null
+++ b/.changeset/hook-doc-use-calendar-navigation.md
@@ -0,0 +1,8 @@
+---
+'@astryxdesign/core': patch
+'@astryxdesign/cli': patch
+---
+
+[docs] Hook docs for `useCalendarNavigation`, so `astryx hook useCalendarNavigation` and `astryx search` return it, and a `useCalendarNavigation — Month Pager` example block: a month-by-month calendar with Previous/Next controls, localized month-year header, and cross-month arrow key navigation using `pendingFocus`. Copy it with `astryx template useCalendarNavigationHookUsage <path>`.
+
+@utkarshpatwa393-sys
diff --git a/apps/sandbox/scripts/next-export-routes.json b/apps/sandbox/scripts/next-export-routes.json
index c9d2068610..e2fbf2c366 100644
--- a/apps/sandbox/scripts/next-export-routes.json
+++ b/apps/sandbox/scripts/next-export-routes.json
@@ -795,6 +795,7 @@
"/templates/theme-showcase/",
"/templates/useAnnounceHookUsage/",
"/templates/useCalendarDaysHookUsage/",
+ "/templates/useCalendarNavigationHookUsage/",
"/templates/useClickableContainerHookUsage/",
"/templates/useClipboardHookUsage/",
"/templates/useCollatorHookUsage/",
diff --git a/internal/shadcn-registry/routes.lock.json b/internal/shadcn-registry/routes.lock.json
index 1428895946..9e5c50c185 100644
--- a/internal/shadcn-registry/routes.lock.json
+++ b/internal/shadcn-registry/routes.lock.json
@@ -3716,6 +3716,11 @@
"path": "examples/use-calendar-days/month-grid",
"aliases": []
},
+ {
+ "name": "example-use-calendar-navigation-month-pager",
+ "path": "examples/use-calendar-navigation/month-pager",
+ "aliases": []
+ },
{
"name": "example-use-clickable-container-clickable-project-card",
"path": "examples/use-clickable-container/clickable-project-card",
@@ -4031,6 +4036,11 @@
"path": "hooks/use-calendar-days",
"aliases": []
},
+ {
+ "name": "hook-use-calendar-navigation",
+ "path": "hooks/use-calendar-navigation",
+ "aliases": []
+ },
{
"name": "hook-use-clickable-container",
"path": "hooks/use-clickable-container",
diff --git a/packages/cli/api/component/__fixtures__/resolutions/modules.txt b/packages/cli/api/component/__fixtures__/resolutions/modules.txt
index 026da20cc5..6e41d1a8ee 100644
--- a/packages/cli/api/component/__fixtures__/resolutions/modules.txt
+++ b/packages/cli/api/component/__fixtures__/resolutions/modules.txt
@@ -249,7 +249,7 @@ useBaseTablePlugins useBaseTablePlugins Table/Table.doc.mjs Table/useBaseTablePl
useBusyAnnouncement useBusyAnnouncement hooks/useAnimatedLayout.doc.mjs hooks/useBusyAnnouncement.ts
useCalendarConstraints useCalendarConstraints Calendar/Calendar.doc.mjs Calendar/hooks/useCalendarConstraints.ts
useCalendarDays useCalendarDays Calendar/useCalendarDays.doc.mjs Calendar/hooks/useCalendarDays.ts
-useCalendarNavigation useCalendarNavigation Calendar/Calendar.doc.mjs Calendar/hooks/useCalendarNavigation.ts
+useCalendarNavigation useCalendarNavigation Calendar/useCalendarNavigation.doc.mjs Calendar/hooks/useCalendarNavigation.ts
useChatComposerTokens useChatComposerTokens Chat/Chat.doc.mjs Chat/useChatComposerTokens.ts
useChatDictation useChatDictation Chat/Chat.doc.mjs Chat/useChatDictation.ts
useChatNewMessages useChatNewMessages Chat/Chat.doc.mjs Chat/useChatNewMessages.ts
diff --git a/packages/cli/api/template/use-calendar-navigation-hook-usage.test.tsx b/packages/cli/api/template/use-calendar-navigation-hook-usage.test.tsx
new file mode 100644
index 0000000000..67cf60bb5c
--- /dev/null
+++ b/packages/cli/api/template/use-calendar-navigation-hook-usage.test.tsx
@@ -0,0 +1,203 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+// @vitest-environment jsdom
+
+/**
+ * The useCalendarNavigation example demonstrates month-by-month pagination
+ * using Previous/Next controls and keyboard arrow navigation moving across
+ * month boundaries via pendingFocus.
+ */
+
+import {act} from 'react';
+import {createRoot, type Root} from 'react-dom/client';
+import {afterEach, beforeEach, describe, expect, it, vi} from 'vitest';
+import UseCalendarNavigationHookUsage from '../../assets/templates/blocks/components/Calendar/useCalendarNavigationHookUsage';
+
+(globalThis as {IS_REACT_ACT_ENVIRONMENT?: boolean}).IS_REACT_ACT_ENVIRONMENT =
+ true;
+
+let root: Root | null = null;
+let container: HTMLElement;
+
+function clickButton(label: string): void {
+ const btn = Array.from(container.querySelectorAll('button')).find(
+ b => b.textContent?.trim() === label,
+ );
+ expect(btn).toBeDefined();
+ act(() => {
+ btn?.click();
+ });
+}
+
+function findDayButton(dayNumber: number): HTMLButtonElement | undefined {
+ const buttons = Array.from(
+ container.querySelectorAll('tbody button'),
+ ) as HTMLButtonElement[];
+ return buttons.find(
+ btn => !btn.disabled && btn.textContent?.trim() === String(dayNumber),
+ );
+}
+
+beforeEach(() => {
+ container = document.createElement('div');
+ document.body.appendChild(container);
+ root = createRoot(container);
+ act(() => {
+ root?.render(<UseCalendarNavigationHookUsage />);
+ });
+});
+
+afterEach(() => {
+ if (root) {
+ act(() => {
+ root?.unmount();
+ });
+ }
+ container.remove();
+});
+
+describe('UseCalendarNavigationHookUsage', () => {
+ it('renders initial month and navigates via Next and Previous buttons', () => {
+ expect(container.textContent).toContain('June 2026');
+
+ // Click Next -> July 2026
+ clickButton('Next');
+ expect(container.textContent).toContain('July 2026');
+
+ // Click Next again -> August 2026
+ clickButton('Next');
+ expect(container.textContent).toContain('August 2026');
+
+ // Click Previous -> July 2026
+ clickButton('Previous');
+ expect(container.textContent).toContain('July 2026');
+ });
+
+ it('advances month and shifts focus when pressing ArrowRight on the last day', () => {
+ expect(container.textContent).toContain('June 2026');
+
+ // June 30 is the last day of June
+ const day30 = findDayButton(30);
+ expect(day30).toBeDefined();
+
+ act(() => {
+ day30?.focus();
+ day30?.dispatchEvent(
+ new KeyboardEvent('keydown', {
+ key: 'ArrowRight',
+ bubbles: true,
+ cancelable: true,
+ }),
+ );
+ });
+
+ // Should have transitioned to July 2026 and focused day 1
+ expect(container.textContent).toContain('July 2026');
+ expect(document.activeElement?.textContent?.trim()).toBe('1');
+ });
+
+ it('reverses arrow direction in right-to-left layout (DR6, DR11)', () => {
+ container.setAttribute('dir', 'rtl');
+ const getComputedStyleSpy = vi
+ .spyOn(window, 'getComputedStyle')
+ .mockImplementation((elt: Element) => {
+ const closestDir = elt.closest('[dir]')?.getAttribute('dir');
+ return {
+ direction: closestDir === 'rtl' ? 'rtl' : 'ltr',
+ } as CSSStyleDeclaration;
+ });
+
+ expect(container.textContent).toContain('June 2026');
+
+ const day30 = findDayButton(30);
+ expect(day30).toBeDefined();
+
+ act(() => {
+ day30?.focus();
+ // In RTL, ArrowLeft navigates forward to next day
+ day30?.dispatchEvent(
+ new KeyboardEvent('keydown', {
+ key: 'ArrowLeft',
+ bubbles: true,
+ cancelable: true,
+ }),
+ );
+ });
+
+ expect(container.textContent).toContain('July 2026');
+ expect(document.activeElement?.textContent?.trim()).toBe('1');
+ getComputedStyleSpy.mockRestore();
+ });
+
+ it('preserves standard arrow direction in nested LTR region inside RTL parent (DR11)', () => {
+ container.setAttribute('dir', 'rtl');
+ const nestedWrapper = document.createElement('div');
+ nestedWrapper.setAttribute('dir', 'ltr');
+ container.appendChild(nestedWrapper);
+
+ const nestedRoot = createRoot(nestedWrapper);
+ act(() => {
+ nestedRoot.render(<UseCalendarNavigationHookUsage />);
+ });
+
+ const getComputedStyleSpy = vi
+ .spyOn(window, 'getComputedStyle')
+ .mockImplementation((elt: Element) => {
+ const closestDir = elt.closest('[dir]')?.getAttribute('dir');
+ return {
+ direction: closestDir === 'rtl' ? 'rtl' : 'ltr',
+ } as CSSStyleDeclaration;
+ });
+
+ const nestedButtons = Array.from(
+ nestedWrapper.querySelectorAll('tbody button'),
+ ) as HTMLButtonElement[];
+ const day30 = nestedButtons.find(
+ btn => !btn.disabled && btn.textContent?.trim() === '30',
+ );
+ expect(day30).toBeDefined();
+
+ act(() => {
+ day30?.focus();
+ // In nested LTR, ArrowRight navigates forward to next day
+ day30?.dispatchEvent(
+ new KeyboardEvent('keydown', {
+ key: 'ArrowRight',
+ bubbles: true,
+ cancelable: true,
+ }),
+ );
+ });
+
+ expect(nestedWrapper.textContent).toContain('July 2026');
+ expect(document.activeElement?.textContent?.trim()).toBe('1');
+
+ act(() => {
+ nestedRoot.unmount();
+ });
+ getComputedStyleSpy.mockRestore();
+ });
+
+ it('ensures no two day buttons share an accessible name', () => {
+ expect(container.textContent).toContain('June 2026');
+
+ // Inside the accessibility tree, only active days in the current month have accessible names
+ const activeDayButtons = Array.from(
+ container.querySelectorAll('tbody button:not([aria-hidden="true"])'),
+ ) as HTMLButtonElement[];
+
+ expect(activeDayButtons.length).toBe(30);
+
+ const names = activeDayButtons.map(btn => btn.getAttribute('aria-label'));
+ const uniqueNames = new Set(names);
+ expect(uniqueNames.size).toBe(activeDayButtons.length);
+
+ // Outside filler days are aria-hidden and do not expose colliding month names
+ const outsideButtons = Array.from(
+ container.querySelectorAll('tbody button[aria-hidden="true"]'),
+ ) as HTMLButtonElement[];
+ expect(outsideButtons.length).toBeGreaterThan(0);
+ for (const btn of outsideButtons) {
+ expect(btn.getAttribute('aria-label')).toBeNull();
+ }
+ });
+});
diff --git a/packages/cli/assets/templates/blocks/components/Calendar/useCalendarNavigationHookUsage.doc.mjs b/packages/cli/assets/templates/blocks/components/Calendar/useCalendarNavigationHookUsage.doc.mjs
new file mode 100644
index 0000000000..275fd872e4
--- /dev/null
+++ b/packages/cli/assets/templates/blocks/components/Calendar/useCalendarNavigationHookUsage.doc.mjs
@@ -0,0 +1,14 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ exampleFor: 'useCalendarNavigation',
+ name: 'useCalendarNavigation — Month Pager',
+ displayName: 'useCalendarNavigation — Month Pager',
+ description:
+ 'A calendar month pager with previous/next navigation buttons, localized month-year label, and cross-month arrow key navigation using pendingFocus.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Button', 'Layout', 'Text'],
+};
diff --git a/packages/cli/assets/templates/blocks/components/Calendar/useCalendarNavigationHookUsage.tsx b/packages/cli/assets/templates/blocks/components/Calendar/useCalendarNavigationHookUsage.tsx
new file mode 100644
index 0000000000..4be15d1a7a
--- /dev/null
+++ b/packages/cli/assets/templates/blocks/components/Calendar/useCalendarNavigationHookUsage.tsx
@@ -0,0 +1,173 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+'use client';
+
+import {useEffect, useRef, useState} from 'react';
+import {
+ useCalendarDays,
+ useCalendarNavigation,
+ type CalendarDay,
+ type ISODateString,
+} from '@astryxdesign/core/Calendar';
+import {Button} from '@astryxdesign/core/Button';
+import {HStack, VStack} from '@astryxdesign/core/Layout';
+import {Text} from '@astryxdesign/core/Text';
+
+export default function UseCalendarNavigationHookUsage() {
+ const [focusDate, setFocusDate] = useState<ISODateString>(
+ '2026-06-01' as ISODateString,
+ );
+
+ const {
+ monthYearLabel,
+ visibleCalendarMonths,
+ navigateMonth,
+ pendingFocus,
+ clearPendingFocus,
+ } = useCalendarNavigation({
+ focusDate,
+ onFocusDateChange: setFocusDate,
+ numberOfMonths: 1,
+ });
+
+ const {weeks, dayNames} = useCalendarDays({
+ ...visibleCalendarMonths[0],
+ weekStartsOn: 0,
+ hasVariableRowCount: true,
+ });
+
+ const dayButtonRefs = useRef<Map<string, HTMLButtonElement>>(new Map());
+
+ // Move focus to target date when navigating across month boundaries
+ useEffect(() => {
+ if (pendingFocus) {
+ const el = dayButtonRefs.current.get(pendingFocus);
+ if (el) {
+ el.focus();
+ clearPendingFocus();
+ }
+ }
+ }, [pendingFocus, clearPendingFocus, weeks]);
+
+ // Arrow key navigation moving across days and month boundaries with RTL awareness (DR6, DR11)
+ const handleKeyDown = (
+ e: React.KeyboardEvent<HTMLButtonElement>,
+ day: CalendarDay,
+ ) => {
+ if (day.isOutside) {
+ return;
+ }
+
+ const isRtl =
+ typeof window !== 'undefined' &&
+ getComputedStyle(e.currentTarget).direction === 'rtl';
+
+ const isNext = isRtl ? e.key === 'ArrowLeft' : e.key === 'ArrowRight';
+ const isPrev = isRtl ? e.key === 'ArrowRight' : e.key === 'ArrowLeft';
+
+ if (isNext) {
+ e.preventDefault();
+ const inMonthDays = weeks.flatMap(w => w.filter(d => !d.isOutside));
+ const currentIndex = inMonthDays.findIndex(d => d.iso === day.iso);
+ if (currentIndex === inMonthDays.length - 1) {
+ // Last day of month: advance month and focus next day across boundary
+ navigateMonth(1, day.iso, 1);
+ } else {
+ const nextDay = inMonthDays[currentIndex + 1];
+ dayButtonRefs.current.get(nextDay.iso)?.focus();
+ }
+ } else if (isPrev) {
+ e.preventDefault();
+ const inMonthDays = weeks.flatMap(w => w.filter(d => !d.isOutside));
+ const currentIndex = inMonthDays.findIndex(d => d.iso === day.iso);
+ if (currentIndex === 0) {
+ // First day of month: step back month and focus previous day across boundary
+ navigateMonth(-1, day.iso, 1);
+ } else {
+ const prevDay = inMonthDays[currentIndex - 1];
+ dayButtonRefs.current.get(prevDay.iso)?.focus();
+ }
+ }
+ };
+
+ return (
+ <VStack gap={3} style={{width: 280}}>
+ <HStack gap={2} vAlign="center" hAlign="between">
+ <Button
+ label="Previous"
+ size="sm"
+ variant="secondary"
+ onClick={() => navigateMonth(-1)}
+ aria-label="Previous month"
+ />
+ <Text type="body" weight="bold">
+ {monthYearLabel}
+ </Text>
+ <Button
+ label="Next"
+ size="sm"
+ variant="secondary"
+ onClick={() => navigateMonth(1)}
+ aria-label="Next month"
+ />
+ </HStack>
+
+ <table style={{tableLayout: 'fixed', width: 280}}>
+ <thead>
+ <tr>
+ {dayNames.map((name, i) => (
+ <th key={i} scope="col">
+ <Text type="supporting" color="secondary">
+ {name}
+ </Text>
+ </th>
+ ))}
+ </tr>
+ </thead>
+ <tbody>
+ {weeks.map(week => (
+ <tr key={week[0].iso}>
+ {week.map(day => (
+ <td key={day.iso} align="center">
+ <button
+ type="button"
+ ref={el => {
+ if (el) {
+ dayButtonRefs.current.set(day.iso, el);
+ } else {
+ dayButtonRefs.current.delete(day.iso);
+ }
+ }}
+ disabled={day.isOutside}
+ aria-hidden={day.isOutside || undefined}
+ onKeyDown={e => handleKeyDown(e, day)}
+ aria-label={
+ day.isOutside
+ ? undefined
+ : `${monthYearLabel} ${day.dayNumber}`
+ }
+ tabIndex={day.isOutside ? -1 : 0}
+ style={{
+ width: 32,
+ height: 32,
+ borderRadius: 6,
+ border: 'none',
+ background: 'transparent',
+ opacity: day.isOutside ? 0.35 : 1,
+ cursor: day.isOutside ? 'not-allowed' : 'pointer',
+ }}>
+ <Text
+ type="body"
+ color={day.isOutside ? 'secondary' : 'primary'}>
+ {day.dayNumber}
+ </Text>
+ </button>
+ </td>
+ ))}
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ </VStack>
+ );
+}
diff --git a/packages/core/src/Calendar/useCalendarNavigation.doc.mjs b/packages/core/src/Calendar/useCalendarNavigation.doc.mjs
new file mode 100644
index 0000000000..f22a56b741
--- /dev/null
+++ b/packages/core/src/Calendar/useCalendarNavigation.doc.mjs
@@ -0,0 +1,173 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+/** @type {import('@astryxdesign/cli/authoring').HookDoc} */
+export const docs = {
+ name: 'useCalendarNavigation',
+ displayName: 'useCalendarNavigation',
+ group: 'Calendar',
+ keywords: [
+ 'calendar',
+ 'navigation',
+ 'month',
+ 'navigateMonth',
+ 'monthYearLabel',
+ 'pendingFocus',
+ 'clearPendingFocus',
+ 'keyboard navigation',
+ 'previous month',
+ 'next month',
+ ],
+ params: [
+ {
+ name: 'options',
+ type: 'UseCalendarNavigationOptions',
+ description: 'Configuration for visible month, calendar system, and navigation callbacks.',
+ required: true,
+ },
+ {
+ name: 'options.initialValue',
+ type: 'ISODateString',
+ description:
+ 'Initial ISO date string (YYYY-MM-DD) used to determine the starting focus month when uncontrolled.',
+ required: false,
+ },
+ {
+ name: 'options.focusDate',
+ type: 'ISODateString',
+ description:
+ 'Controlled ISO date string (YYYY-MM-DD) determining which month is currently displayed. Used with onFocusDateChange as a controlled pair.',
+ required: false,
+ },
+ {
+ name: 'options.onFocusDateChange',
+ type: '(focusDate: ISODateString) => void',
+ description:
+ 'Callback invoked when user navigation changes the visible focus month. Used with focusDate as a controlled pair.',
+ required: false,
+ },
+ {
+ name: 'options.numberOfMonths',
+ type: '1 | 2',
+ description:
+ 'Number of consecutive months to display simultaneously (1 or 2). Default is 1.',
+ default: '1',
+ required: false,
+ },
+ {
+ name: 'options.calendar',
+ type: 'CalendarSystem',
+ description:
+ "Calendar system whose months the hook steps and formats (e.g. 'gregory', 'persian', 'hebrew'). Calendars other than gregory, iso8601, buddhist, roc and japanese need Temporal. The provider's calendar is never read. Default is 'gregory'.",
+ default: "'gregory'",
+ required: false,
+ },
+ ],
+ returns: [
+ {
+ name: 'baseMonth',
+ type: 'PlainDate',
+ description: 'The Gregorian first day of the primary focus month.',
+ },
+ {
+ name: 'visibleMonths',
+ type: 'PlainDate[]',
+ description: 'Array of Gregorian first-day PlainDate objects for each currently visible month.',
+ },
+ {
+ name: 'visibleCalendarMonths',
+ type: '{year: number; month: number}[]',
+ description:
+ 'Array of year and month pairs for each visible month in the active calendar system, compatible with useCalendarDays options.',
+ },
+ {
+ name: 'monthYearLabel',
+ type: 'string',
+ description:
+ 'Formatted localized header label for the visible month or range of months (e.g. "June 2026").',
+ },
+ {
+ name: 'navigateMonth',
+ type: '(delta: number, focusedDate?: ISODateString, offset?: number) => void',
+ description:
+ 'Steps the visible month forward (+1) or backward (-1). When focusedDate is passed, computes pendingFocus on the target date across the month boundary using offset (defaults to 7).',
+ },
+ {
+ name: 'pendingFocus',
+ type: 'ISODateString | null',
+ description:
+ 'Target ISO date to focus following a month navigation step, or null when no cross-month keyboard focus is pending.',
+ },
+ {
+ name: 'clearPendingFocus',
+ type: '() => void',
+ description:
+ 'Clears pendingFocus once the target day cell has received keyboard focus.',
+ },
+ ],
+ usage: {
+ description:
+ 'Manages visible month state and pagination for calendar components. It provides previous/next month stepping, localized month-year header strings, and pending focus tracking so keyboard arrow navigation seamlessly moves focus across month boundaries into the adjacent month. Use it directly when composing custom calendar headers, pager controls, or dual-month availability pickers.',
+ bestPractices: [
+ {
+ guidance: true,
+ description:
+ 'Wire navigateMonth(-1) and navigateMonth(1) to Previous/Next icon buttons to paginate months.',
+ },
+ {
+ guidance: true,
+ description:
+ 'Pass focusedDate and offset (e.g. 1 for horizontal arrow keys, 7 for vertical arrow keys) to navigateMonth so pendingFocus directs keyboard focus to the correct day cell after the month transition.',
+ },
+ {
+ guidance: false,
+ description:
+ 'Hardcode month-year header strings manually; use monthYearLabel which automatically formats according to the active locale and calendar system.',
+ },
+ ],
+ },
+ relatedComponents: ['Calendar'],
+ relatedHooks: ['useCalendarDays', 'useCalendarConstraints'],
+ importPath: '@astryxdesign/core/Calendar',
+ category: 'utilities',
+};
+
+/** @type {import('@astryxdesign/cli/authoring').HookTranslationDoc} */
+export const docsDense = {
+ description:
+ 'Manages visible month pagination, previous/next stepping, localized month-year labels, and pending cross-month keyboard focus.',
+ paramDescriptions: {
+ options: 'Calendar navigation configuration.',
+ 'options.initialValue': 'Starting ISO date for uncontrolled navigation.',
+ 'options.focusDate': 'Controlled visible month ISO date.',
+ 'options.onFocusDateChange': 'Callback when visible month changes.',
+ 'options.numberOfMonths': 'Number of visible months (1 or 2).',
+ 'options.calendar': 'Calendar system to step and label; default gregory.',
+ },
+ returnDescriptions: {
+ baseMonth: 'First day PlainDate of focus month.',
+ visibleMonths: 'Array of first-day PlainDate objects for visible months.',
+ visibleCalendarMonths: 'Year/month pairs in active calendar system for useCalendarDays.',
+ monthYearLabel: 'Localized month-year header string.',
+ navigateMonth: 'Steps visible month by delta, setting pendingFocus if focusedDate passed.',
+ pendingFocus: 'Target ISO date to focus across month boundary.',
+ clearPendingFocus: 'Clears pending focus state.',
+ },
+ usage: {
+ description:
+ 'Provides visible month pagination, localized header labels, and pending focus tracking for calendar views.',
+ bestPractices: [
+ {
+ guidance: true,
+ description: 'Wire navigateMonth(-1) and navigateMonth(1) to Previous/Next buttons.',
+ },
+ {
+ guidance: true,
+ description: 'Provide focusedDate and offset to navigateMonth during keyboard navigation.',
+ },
+ {
+ guidance: false,
+ description: 'Format month-year labels manually instead of using monthYearLabel.',
+ },
+ ],
+ },
+};