-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom props to CustomCells #577
Comments
This is my way to solve the problem, but i think that an attribute on MultiViewCalendar can be a better solution.
I hope this part of code can be useful to someone. |
@gine Thank you for the code and the suggestion. We introduced the cell property specifically to cover cases like this one. We want to follow the ReactJS concept fro reusable components, this is why we provide an option for custom replaceable elements instead of properties for modifications like this one. Let`s compare the two options:
|
I'm new with reactjs system so i can't help with this discussion. I'm talking only about what I would like already built-in from a component like a calendar. The Feature disable days with an attribute, i think that is normal use case not a customization. But sure for a lot of other calendar use, cell property(maybe with more documentation) it's the solution. Let's see other opinions. |
@gine thank you for the feedback. We do have a demo specifically for this use case: |
Although that the requirement can be achieved with the suggested solution (or with React Context with functional component), having a property that will accept an array of dates and pass that collection to the cell would be useful. The property can be "disabledDates" and we can also add disabled state directly to cells. The array can contain explicit dates, day of the week (as string) and maybe even number (for days of month). |
I'm submitting a...
Current behavior
Today navigating on documentation i have seen that for angular components is present a method to permit to disable some days meanwhile in react component is missing.
I'm pretty sure that can be done passing some "config data" to the customCell components setting isDisabled, maybe with redux, but i can't undestand how pass props to that component.
What is the motivation or use case for changing the behavior?
It can be useful to permit a more fast customization. I think that often the customer must exclude some days from booking for some reason from their regular working months
The text was updated successfully, but these errors were encountered: