Replies: 2 comments 4 replies
-
@amivag thanks for your feedback! We need indeed to improve our custom components docs (see also #2118). Could you please provide a full sample of your code, using maybe a CodeSandbox? The |
Beta Was this translation helpful? Give feedback.
-
I tested your example, and it's working well. Thank you! I have one last piece of the puzzle I need to figure out: For example, let's say I have an object containing day stats: I want to have this accessible in the CustomDay or CustomDayButton component, for this particular day. Thanks! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to create a custom component to represent a day in the calendar, and I need help because my attempts fail.
I start by creating a CustomDayButton that will return each day as an asterisk, to make sure my component is used.
(The next step would be to be able to extract the day number, and print that with an asterisk)
Here is my code...
And here's how I assign it to the calendar...
All days show normally as numbers, not asterisks. What am I doing wrong?
PS. Currently using react-day-picker version 9.7.0
PS2. The documentation is very unclear on this topic. It would be really helpful to include a thorough example on how to provide a custom day component.
Beta Was this translation helpful? Give feedback.
All reactions