You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`captionLayout`|`"label"`<br/> \|`"dropdown"`<br/> \|`"dropdown-months"`<br/> \|`"dropdown-years"`| Choose the layout of the month caption. Default is `label`. |
12
-
|`fixedWeeks`|`boolean`| Display 6 weeks per month. |
13
-
|`footer`|`ReactNode`\|`string`| Add a footer to the calendar, acting as a [live region](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions). |
14
-
|`hideWeekdays`|`boolean`| Hide the row displaying the weekday names. |
15
-
|`numberOfMonths`|`number`| The number of displayed months. Default is `1`. |
16
-
|`showOutsideDays`|`boolean`| Display the days falling into other months. |
17
-
|`showWeekNumber`|`boolean`| Display the column with the [week numbers](#showweeknumber). |
|`captionLayout`|`"label"`<br/> `"dropdown"`<br/> `"dropdown-months"`<br/> `"dropdown-years"`| Choose the layout of the month caption. Default is `label`. |
12
+
|`navLayout`|`around`\|`end`| Adjust the positioning of the navigation buttons. |
13
+
|`fixedWeeks`|`boolean`| Display 6 weeks per month. |
14
+
|`footer`|`ReactNode`\|`string`| Add a footer to the calendar, acting as a [live region](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions). |
15
+
|`hideWeekdays`|`boolean`| Hide the row displaying the weekday names. |
16
+
|`numberOfMonths`|`number`| The number of displayed months. Default is `1`. |
17
+
|`showOutsideDays`|`boolean`| Display the days falling into other months. |
18
+
|`showWeekNumber`|`boolean`| Display the column with the [week numbers](#showweeknumber). |
18
19
19
20
## Caption Layouts
20
21
@@ -54,6 +55,42 @@ Without specifying the `startMonth` and `endMonth` properties, the dropdown will
54
55
55
56
:::
56
57
58
+
## Navigation Layouts
59
+
60
+
Use the `navLayout` prop to adjust the positioning of the navigation buttons.
|`"around"`| Buttons are displayed on either side of the caption. |
65
+
|`"after"`| Buttons are displayed after the caption, ensuring the tab order matches the visual order. |
66
+
|`undefined`| Buttons are displayed after the caption, but the tab order may not match the visual order. |
67
+
68
+
```tsx
69
+
<DayPickernavLayout="around" />
70
+
```
71
+
72
+
<BrowserWindow>
73
+
<Examples.NavLayout />
74
+
</BrowserWindow>
75
+
76
+
```tsx
77
+
<DayPickernavLayout="after" />
78
+
```
79
+
80
+
<BrowserWindow>
81
+
<Examples.NavLayoutAfter />
82
+
</BrowserWindow>
83
+
84
+
See [Navigation](./navigation.mdx) for additional ways to customize the calendar’s navigation.
85
+
86
+
:::info Tab Order vs. Visual Order
87
+
88
+
If not set, the navigation buttons default to being displayed after the caption. However, the tab order may not align with the visual order when setting `"dropdown"` as caption layout. To ensure the component [remains accessible](https://www.w3.org/TR/WCAG22/#focus-order), set `navLayout` to `"after"` or to `"around"` instead of leaving it undefined.
89
+
90
+
In a future version, the default behavior will be changed to `"after"`.
91
+
92
+
:::
93
+
57
94
## Outside Days
58
95
59
96
By default, DayPicker hides the days falling into other months. Use `showOutsideDays` to display them.
0 commit comments