| Issue 2104: | End date is incorrect when updateEvent with different allDay | |
| 2 people starred this issue and may be notified of changes. | Back to list |
1. Existing event, allDay true. Modify it with update Event, change allDay to false, set new duration to few hours. Duration is always 2 hours. 2. Existing event, allDay false. Modify it with update Event, change allDay to true, set new duration to few days. Duration is always 1 day.
Mar 11, 2014
It seems this functionality was designed for drag&drop, it makes sense to drop end time when dragging between all-day area and time-based area.
Here is a workaround: implement a hook on eventRender where: suppress rendering of event, add a timer for few milliseconds (to achieve asynchronous call, otherwise will get into an infinite loop) and when it fires, save again the event.
Here an example:
calendar = $('#calendar').fullCalendar({
....................
eventRender: function (event, element) {
if (bookingEnd != null) { // stored only if allDay is changed
event.end = $.fullCalendar.moment(bookingEnd);
setTimeout(function () {
calendar.fullCalendar('updateEvent', event, true);
}, 10);
bookingEnd = null;
return false; // to prevent rendering
}
}
...........
}
where bookingEnd is stored globally on user event saving...
Apr 21, 2014
When the property Allday default = false or reading of data base Allday and treat the "eventRender" event, nothing is displayed. The "compileSlotSegs" fullcalendar.js function has an error in the "colSegs" object. The "colSegs' object has no data. This happens in version 2.0.0-beta2. In version 1.6.4 works correctly. thanks
Jun 7, 2014
(No comment was entered for this change.)
Status:
Reproducing
Labels: Type-Bug
Jun 11, 2014
I'm having a tough time understanding what the problem is. The various problems mentioned might be multiple unrelated issues. Anyway, updateEvent has had an overhaul in 2.0, so the problem is probably fixed. If you have further problems, please post a recreation of the bug. It is important that it be something that can be demonstrated in JSFiddle, easily (by clicking a button and seeing the bad behavior, for example). Instructions: http://arshaw.com/fullcalendar/wiki/Reporting-Bugs/
Status:
Invalid
|
|
| ► Sign in to add a comment |
I've experienced a similar issue but it could be because of I was trying to update it via a copy of 'event' rather than the original. "event must be the original Event Object for an event, not merely a reconstructed object" Updating the title and color works perfectly with a copy, but when I tried to update the end date this caused the event to be only 2 hours long. For whatever reason this works perfectly but updating the end date doesn't... eventClick: function (event, jsEvent, view) { $editEvent = event; runfunction(); } function runfunction() { $editEvent.title = 'New title'; $editEvent.color = '#ff0000'; $('#calendar').fullCalendar('updateEvent', $editEvent); }