Skip to content
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

"Maximum update depth exceeded" error when updating event state on datesSet with dateIncrement in days #131

Closed
saramcicchi opened this issue Mar 9, 2021 · 4 comments
Assignees
Milestone

Comments

@saramcicchi
Copy link

In a custom view, when the dateIncrement is set to { day: # } as opposed to a string "hh:mm", a "Maximum update depth exceeded" error occurs.

https://codesandbox.io/s/full-calendar-date-increment-bug-yo87v?file=/src/DemoApp.jsx

The above sandbox initially works. But if you comment out the dateIncrement: "24:00" and uncomment the dateIncrement: { days: 1 }, an error occurs.
image

@acerix acerix changed the title "Maximum update depth exceeded" error when dateIncrement is of type { day: # } "Maximum update depth exceeded" error when updating event state on dateSet with dateIncrement in days Mar 9, 2021
@acerix acerix changed the title "Maximum update depth exceeded" error when updating event state on dateSet with dateIncrement in days "Maximum update depth exceeded" error when updating event state on datesSet with dateIncrement in days Mar 9, 2021
@acerix
Copy link
Member

acerix commented Mar 9, 2021

I believe the issue is with updating the event state from datesSet which causes a loop, and likely the same cause as in this issue:

fullcalendar/fullcalendar#7069

eg. there is no error by commenting out "datesSet":

https://codesandbox.io/s/full-calendar-date-increment-bug-forked-1p5e1?file=/src/DemoApp.jsx

It does seem like a bug and I'm not sure why dateIncrement is related, but if you want to supply dynamic events based on dates of the view, you can supply the events "as a function" which is designed for that:

https://fullcalendar.io/docs/events-function

@arshaw arshaw added this to the upcoming-release milestone Mar 9, 2021
@sseemmiin
Copy link

same as me on 5.8.0

@brandonklk
Copy link

same as me on 5.10.0

@arshaw
Copy link
Member

arshaw commented Jul 27, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

5 participants