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
The `monthHeaderPosition` prop allows you to control where the month header (e.g., "December 2025") is displayed in the calendar. By default, it appears in the standard header section above the day names. You can reposition the header to appear between the day names and calendar days ("middle") or at the bottom of the calendar ("bottom").
6
+
7
+
## Type
8
+
9
+
```typescript
10
+
monthHeaderPosition?:"top"|"middle"|"bottom";
11
+
```
12
+
13
+
## Values
14
+
15
+
-`"top"` (or undefined) - Month header appears in the standard position at the top of the calendar (default)
16
+
-`"middle"` - Month header appears between day names and calendar days
17
+
-`"bottom"` - Month header appears at the bottom of the calendar
18
+
19
+
## Usage
20
+
21
+
```tsx
22
+
importReact, { useState } from"react";
23
+
importDatePickerfrom"react-datepicker";
24
+
25
+
// Example 1: Header in the middle (between day names and days)
- When `monthHeaderPosition` is set to `"middle"` or `"bottom"`, the month header (including navigation buttons and dropdowns) is removed from the default header section
50
+
- Works with multiple months (`monthsShown` prop) - each month's header will be positioned accordingly
51
+
- Navigation buttons are included and properly positioned in all three position options
0 commit comments