-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
Description
Check that this is really a bug
- I confirm
Reproduction link
https://codesandbox.io/s/react-big-calendar-example-forked-o0b8z0?file=/src/App.js
Bug description
The documentation for creating a custom view shows this pattern being used:
const {views, ...otherProps} = useMemo(() => ({
views: {
month: true,
week: CustomWeekView,
day: true
},
// ... other props
}), [])This makes it seem like if I pass day: false, the day view will disappear. However, that's not the case.
I would be happy to explore the codebase a little and fix this. Lemme know.
Expected Behavior
The day view should disappear when day: false is passed to the views prop.
Actual Behavior
The day view still appears, and it displays the error: View.title is not a function because it is still expecting for there to be a view there.
react-big-calendar version
1.5.0
React version
18.2.0
Platform/Target and Browser Versions
Firefox 104.0
Validations
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
- Make sure this is a react-big-calendar issue and not an implementation issue
Would you like to open a PR for this bug?
- I'm willing to open a PR