react-day-picker / website /examples-v8 /ModifiersClassnames.tsx
AbdulElahGwaith's picture
Upload folder using huggingface_hub
cf86710 verified
import { DayPicker } from "./react-day-picker-v8";
const bookedDays = [
new Date(2021, 5, 8),
new Date(2021, 5, 9),
new Date(2021, 5, 11)
];
const style = `
.my-booked-class {
color: tomato;
}
`;
export function ModifiersClassnames() {
return (
<>
<style>{style}</style>
<DayPicker
defaultMonth={bookedDays[0]}
modifiers={{
booked: bookedDays
}}
modifiersClassNames={{
booked: "my-booked-class"
}}
/>
</>
);
}