Week numbers

Use the showWeekNumbers prop to display a column with the weeks numbers.

Code


import React from 'react';
import DayPicker from 'react-day-picker';
import 'react-day-picker/lib/style.css';

export default function Example() {
  return (
    <DayPicker
      showWeekNumbers
      onWeekClick={(week, days) => console.log(week, days)}
    />
  );
}

Result


March 2021
Su
Mo
Tu
We
Th
Fr
Sa
9
1
2
3
4
5
6
10
7
8
9
10
11
12
13
11
14
15
16
17
18
19
20
12
21
22
23
24
25
26
27
13
28
29
30
31