Skip to content
Discussion options

You must be logged in to vote

@Azhr-Mughl you need to add "modifiers" for past/future

<DayPicker
  modifiers={{
    past: { before: new Date() },
    future: { after: new Date() },
    // upcoming: { after: new Date() }, // as per your code
  }}
  modifiersClassNames={{
     past: "past-date",
     future: "future-date",
     // upcoming: "upcoming", // as per your code
  }}
/>

See this example:

https://codesandbox.io/p/sandbox/react-day-picker-forked-nftt8s?file=%2Fsrc%2FApp.tsx

where past days are blue and future days are red:

Replies: 1 comment

Comment options

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