Skip to content
Discussion options

You must be logged in to vote

@EliazTray the number of months prop is used to display consecutive months. If you need two calendar independent each others, you can use two instances of DayPicker:

  • share the same range between the two calendars
  • play with startMonth and endMonth to better the behavior for the left/right calendar:

https://stackblitz.com/edit/vitejs-vite-bfqtrh?file=src%2FApp.tsx

Screen.Recording.2024-09-22.at.6.10.39.PM.mov
import { useState } from 'react';
import { DateRange, DayPicker } from 'react-day-picker';
import 'react-day-picker/style.css';

export default () => {
  const [range, setRange] = useState<DateRange | undefined>({
    from: new Date(2024, 1, 10),
    to: new Date(2025, 5, 3),

Replies: 3 comments

This comment has been hidden.

Comment options

You must be logged in to vote
0 replies
Answer selected by EliazTray
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2450 on September 14, 2024 11:09.