Customization
Multiple months
Use numberOfMonths to render more than one calendar.
import React from 'react';
import { DayPicker } from 'react-day-picker';
export default function App() {
return <DayPicker id="example" numberOfMonths={2} />;
}
May 2026
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
June 2026
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Paged navigation
When rendering multiple months, use pagedNavigation to navigate the number of
months per time.
import React from 'react';
import { DayPicker } from 'react-day-picker';
export default function App() {
return <DayPicker numberOfMonths={2} pagedNavigation />;
}
May 2026
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
June 2026
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Showing the outside days
Use showOutsideDays to display the days falling out the current month.
import React from 'react';
import { DayPicker } from 'react-day-picker';
export default function App() {
return <DayPicker showOutsideDays />;
}
May 2026
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
26 | 27 | 28 | 29 | 30 | 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | 1 | 2 | 3 | 4 | 5 | 6 |
Using fixed weeks
When showOutsideDays is turned on, use fixedWeeks to display six weeks per
months. This will prevent the calendar to change its height when navigating.
import React from 'react';
import { DayPicker } from 'react-day-picker';
export default function App() {
return <DayPicker showOutsideDays fixedWeeks />;
}
May 2026
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
26 | 27 | 28 | 29 | 30 | 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | 1 | 2 | 3 | 4 | 5 | 6 |
Showing the week numbers
Use showWeekNumber to display the week numbers.
import React, { useState } from 'react';
import { DayPicker } from 'react-day-picker';
export default function App() {
const [weekNumber, setWeekNumber] = useState<number>();
const footer = weekNumber
? `You clicked the week n. ${weekNumber}.`
: 'Try clicking a week number.';
return (
<DayPicker
showWeekNumber
onWeekNumberClick={setWeekNumber}
footer={footer}
/>
);
}
May 2026
| Su | Mo | Tu | We | Th | Fr | Sa | |
|---|---|---|---|---|---|---|---|
1 | 2 | ||||||
3 | 4 | 5 | 6 | 7 | 8 | 9 | |
10 | 11 | 12 | 13 | 14 | 15 | 16 | |
17 | 18 | 19 | 20 | 21 | 22 | 23 | |
24 | 25 | 26 | 27 | 28 | 29 | 30 | |
31 | |||||||
| Try clicking a week number. | |||||||
Switching to ISO Week Dates
DayPicker uses date-fns getWeek to calculate the week number. By default, the week starts on Sunday and the first week of the year is the one that contains January 1st.
Use ISOWeek to switch using ISO Week Dates instead of the locale setting.
import React from 'react';
import { DayPicker } from 'react-day-picker';
export default function App() {
return <DayPicker ISOWeek showWeekNumber />;
}
May 2026
| Mo | Tu | We | Th | Fr | Sa | Su | |
|---|---|---|---|---|---|---|---|
| 18 | 1 | 2 | 3 | ||||
| 19 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 20 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 21 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 22 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Customizing week numbers
- use
weekStartsOnto set the first day of the week. - use
firstWeekContainsDateto set the day of January, which is always in the first week of the year. - use
formatters.formatWeekNumberto change how week numbers are displayed.
import React from 'react';
import { DayPicker } from 'react-day-picker';
export default function App() {
return (
<DayPicker
showWeekNumber
weekStartsOn={2} // Tuesday as first day of the week
firstWeekContainsDate={4} // Number the first week of the year from day 4
formatters={{
// Add `W` prefix to week number
formatWeekNumber: (weekNumber) => `W${weekNumber}`
}}
/>
);
}
May 2026
| Tu | We | Th | Fr | Sa | Su | Mo | |
|---|---|---|---|---|---|---|---|
| W18 | 1 | 2 | 3 | 4 | |||
| W19 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| W20 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| W21 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| W22 | 26 | 27 | 28 | 29 | 30 | 31 |