-
Codeimport { DayPicker, getDefaultClassNames } from "react-day-picker";
export function MyCalendar() {
const defaultClassNames = getDefaultClassNames();
return (
<DayPicker
mode="single"
classNames={{
today: `border-amber-500`, // Add a border to today's date
selected: `bg-amber-500 border-amber-500 text-white`, // Highlight the selected day
calendar: `${defaultClassNames.calendar} shadow-lg p-5` // Add a shadow to the calendar
chevron: `${defaultClassNames.chevron} fill-amber-500` // Change the color of the chevron
}}
/>
);
} Expected BehaviorThe function must be available. Actual BehaviorThis function does not exists in the imports. Screenshots |
Beta Was this translation helpful? Give feedback.
Answered by
LWJerri
Aug 6, 2024
Replies: 2 comments 2 replies
-
@LWJerri are you sure you have installed the latest version? Some cache in your dependency? The function is actually exported: https://daypicker.dev/api/functions/getDefaultClassNames |
Beta Was this translation helpful? Give feedback.
2 replies
-
(PS. There's an error in the documentation code that is going to be fixed via your other report #2342) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello. I was on 8.10.1 version, now I on the latest and everything is fine.