-
I can currently apply custom classes for
|
Beta Was this translation helpful? Give feedback.
Answered by
gpbl
Dec 23, 2023
Replies: 1 comment
-
@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: ![]() |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
gpbl
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Azhr-Mughl you need to add "modifiers" for past/future
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: