question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: exception using 'updateEvent' and changing allDay from false to true

See original GitHub issue

An exception occurs when a non-daily event is updated to be a daily event. Please see this fiddle (the event is automatically updated after 2 seconds).

VM2146 fullcalendar.js:650 Uncaught TypeError: Cannot read property 'clone' of null

The problems seems to arise in the mutateEvent() method:

...
normalizeEventDates(oldProps);  // <-- this will nullify oldProps.end because end == start (we strip the time so they will both be midnight of the original date)

// need to clear the end date if explicitly changed to null
clearEnd = event._end !== null && newProps.end === null;

// compute the delta for moving the start date
startDelta = diffDates(newProps.start, oldProps.start);

// compute the delta for moving the end date
if (newProps.end) {
	endDelta = diffDates(newProps.end, oldProps.end);  // <-- since oldProps.end is null, this raise an exception
	durationDelta = endDelta.subtract(startDelta);
}
...

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
arshawcommented, Jul 15, 2017

In a recent refactor, which is now pushed to master, this is fixed. test I made:

https://github.com/fullcalendar/fullcalendar/commit/0d69aca083f5d3e75ad3d47c2d94ea95be380400

will be release soon.

0reactions
arshawcommented, Aug 31, 2017

Released in v3.5.0 (blog post)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Update event - Microsoft Graph v1.0
An event update that includes only the attendees property in the ... Boolean, True if this event has online meeting information, false ......
Read more >
How to change start date, end date in update dialog in ...
In calendarscript.js I added two lines, passing the new values for the dates, but I get the error: 'System.FormatException-- /Date(NaN)/ ...
Read more >
On Clicking of Mass update button in list view a backend ...
First exception on row 0 with id a08c00000080wefAAA; first error: ... IsAllDayEvent=False; //Evnt is not all day system.debug(s.
Read more >
src/com/android/providers/calendar/CalendarProvider2.java ...
Projection to query for correcting times in allDay events. ... set to 'true' to enable debug logging for recurrence exception code */.
Read more >
Events: insert | Google Calendar
Property name Value Notes end nested object start nested object anyoneCanAddSelf boolean writable
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found