-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Trouble in Next js #2631
Comments
Hi @levis-creator I faced the issue also. This code works well for me. Do check it out `"use client"; const locales = { const localizer = dateFnsLocalizer({ const events = [ function DashboardCalendar({ className }) { const handleNavigate = (newDate) => { const handleViewChange = (newView) => { return ( export default DashboardCalendar;` |
same issue. +1 |
Thank you very much this is very helpful |
@Shanmugavadivelu7 this just results in a blank page. The DashboardCalendar isn't even being used. How did this work well for you? Do you have a full working example? |
@levis-creator is this still a issue, if not please close the issue |
@hak33m16 create a new page in next js. Copy paste the code and navigate to your route in browser. |
One can make it work by providing date, view, onNavigate and onView explicitly: const [view, setView] = useState<View>(Views.MONTH)
const [date, setDate] = useState<Date>(new Date())
return (
<Calendar
// ...
view={view}
onView={setView}
date={date}
onNavigate={setDate}
/>
) (the code snippet can be used freely) |
Thanks for the tips, I ran into this issue as well (on next@14.2.3 and react-big-calendar@1.15.0). Here's the full working component:
Don't forget to set a height on the calendar wrapper div! |
Check that this is really a bug
Reproduction link
https://github.com/jquense/react-big-calendar/blob/master/stories/demos/exampleCode/basic.js
Bug description
I have added react-big-calender library inside my app it is displaying the calendar but i cannot navigate to the different options, I have mirrored one of the the documentation example but still having the same issue
Expected Behavior
Expected to be able to navigate within the tabs option
Actual Behavior
Unable to navigate within the tabs
react-big-calendar version
1.13.1
React version
18
Platform/Target and Browser Versions
All
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: