| Issue 1868: | updateEvent cause invalid date of start and/or end | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Please include a demonstration of your bug (URL or ZIP attachment), as well as a detailed description.
My purpose is to update a single event on the calendar which was getting loaded with an eventsource.
The parameter is the event object which getting received when calling the renderEvent function. ( Is stored in the jQuery data store. )
Testscenario:
1. Open the calendar in the default view: 'agendaDay'
2. Events getting loaded for this day. (All are allDay: false but for each start are two events with different id's)
3. Switch to agendaWeek (Very important, otherwise the event of the renderEvent and those in the cache is the same. ( if (e._id == event._id && e != event ) )
4. Call js function (.fullCalendar('updateEvent', event);) (outside the fc scope) which update a single event
5. The updated event disappears from the calendar because the date's are 'Invalid Date'
The event object itself has as start and end a string like
end: "2013-06-13T10:15:00" and is not the parsed date format (
end: Thu Jun 13 2013 10:15:00 GMT+0200 (CEST)) as after normalizeEvent.
Event:
_end: Thu Jun 13 2013 10:15:00 GMT+0200 (CEST)
_id: "10"
_start: Thu Jun 13 2013 10:00:00 GMT+0200 (CEST)
allDay: false
className: "fce-free"
editable: false
end: "2013-06-13T10:15:00"
id: 10
prty: 1
source: Object
start: "2013-06-13T10:00:00"
title: "10:00"
__proto__: Object
FC Init:
eventSources : [ {
url: '/events',
}],
minTime : 4,
maxTime : 22,
slotMinutes : 10,
aspectRatio : 1,
defaultView : 'agendaDay', //'agendaWeek',
allDaySlot: true,
allDayText: 'Day<br/>Info',
firstDay: 1,
firstHour: 8,
lazyFetching: false,
header : {
left : 'prev,next, today',
center : 'title',
right : 'month,agendaWeek,agendaDay'
},
loading: function(isLoading) {
handleLoading(isLoading);
},
eventClick: function(calEvent, jsEvent, view) {
showBookingContent(this, calEvent);
},
eventRender: function(event, element) {
element.data('fc-event', event);
jQuery(element ).attr('id', event.id)
},
eventAfterAllRender : function(view) {
initDrop();
return true;
},
titleFormat: {
month: "MMMM yyyy",
week: "d [MMM] [ yyyy] { '—'[d MMM] yyyy}",
day: "d MMM yyyy"
},
axisFormat: 'HH:mm'
Workaround is:
1. Fetch the event by eventId .fullCalendar('clientEvents', eventId);
2. @function updateEvent
parse the start and end date while calculating startDelta and endDelta
Aug 24, 2013
Project Member
#1
adamrs...@gmail.com
Status:
ReproTemp
Aug 25, 2013
This message is being bulk-sent to a number of issues, both [very] old and new.
I have been working on taming this issue tracker, which has gotten out of control after months of neglect. You are receiving this message because I could not successfully reproduce the bug you were reporting with a reasonable amount of effort. I have written some new bug-report guidelines to be used by all bug reports going forward:
http://arshaw.com/fullcalendar/wiki/Report-a-Bug/
Its salient point is that all bug reports should have an isolated demonstration, viewable online with a tool like JSFiddle.
If the bug you originally reported is still important to you, could you please first try the latest version of FullCalendar and see if it is fixed? If not, could you please file a NEW bug report that follows the new guidelines? This issue will not be monitored for further comments.
I'm sorry I have taken so long to respond to many of your request, and I'm sorry if this new procedure causes extra work for you. Going forward, the issue tracker will be much more of a well-oiled machine.
Again, if you must, PLEASE SUBMIT A *NEW* BUG REPORT (following the new guidelines) INSTEAD OF COMMENTING ON THIS ONE. Further comments on this report will be ignored. Thanks.
Status:
Invalid
Labels: -Type-Defect Type-Bug |
|
| ► Sign in to add a comment |