jquery-week-calendar
jquery-week-calendar copied to clipboard
eventDrop bug : failed to manipulate element after drop
I use 'eventDrop' and want to modify color of element after drop but no luck. ===> eventDrop: function(newCalEvent, oldCalEvent, element)
After looking at the source code, I found that the element argument of eventDrop function is the old element, which is hidden and removed.
The bug is in lines 1795 - 1798. Source code is as following: row 1795 ===> //trigger drop callback row 1796 ===> options.eventDrop(newCalEvent, calEvent, $calEvent); row 1797 ===> row 1798 ===> var $newEvent = self._renderEvent(newCalEvent, self._findWeekDayForEvent(newCalEvent, $weekDayColumns));
I think $calEvent passed to optoins.eventDrop() should be $newEvent
Ping?
The drag/drop also does not pay attention to freeBusys. For example, in Demo 3, you can drag events on to the Busy area. To change this behaviour you also need to pass FreeBusyManager and calendar to eventDrop, so that the user can implement the same freeBusy checks as in eventNew