Home page
Edit code

Show the week numbers

Use showWeekNumbers to show the week numbers and onWeekClick to intercept the clicked week.

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)}
    />
  );
}