| Issue 2084: | Replacing start or end on an existing event generate a javascript error | |
| 2 people starred this issue and may be notified of changes. | Back to list |
Steps to reproduce:
- Retrieve an existing event with the clientEvents method
var myEvent = $calendar.fullCalendar('clientEvents')
- Replace start or end property with another moment
myEvent.start = moment('2014-01-01 08:00')
- Reinject the event $calendar.fullCalendar('updateEvent', myEvent)
What is expected:
The original event should appear updated
What happens:
An error is thrown
TypeError: newEnd.hasTime is not a function (fullcalendar.js line 1734)
newAllDay = !(newStart || newEnd).hasTime();
Workaround
line 1720, replace
// if no new dates were passed in, compare against the event's existing dates
if (!newStart && !newEnd) {
newStart = event.start;
newEnd = event.end;
}
by
// if no new dates were passed in, compare against the event's existing dates
if (!newStart && !newEnd) {
newStart = t.moment(event.start);
newEnd = t.moment(event.end);
}
Feb 8, 2014
#1
jonathan...@gmail.com
Feb 19, 2014
Thanks for the workaround. I'll have to try that at some point. Here's a jsfiddle that reproduces the issue: http://jsfiddle.net/cr8zQ/521/
Mar 21, 2014
(No comment was entered for this change.)
Status:
Reproducing
Labels: Type-Bug milestone-date
May 25, 2014
(No comment was entered for this change.)
Status:
Implemented
Jun 2, 2014
version 2 has been released with this change. http://blog.arshaw.com/1/post/2014/06/fullcalendar-2-released.html
Status:
Released
|
|
| ► Sign in to add a comment |