jquery-week-calendar icon indicating copy to clipboard operation
jquery-week-calendar copied to clipboard

When dragging, the element given to eventDrag function is undefined

Open fgeorgsson opened this issue 13 years ago • 0 comments

If you supply a function for drag start, the element variable is undefined instead of containing the dragged element.

jQuery('#calendar').weekCalendar({
    ...
    eventDrag : function(calEvent, element) {
        element.addClass('moving'); // element is undefined
    },
    ...
});

Can be solved by editing jquery.weekcalendar.js line 1687 from

var $calEvent = ui.draggable;

to

var $calEvent = ui.draggable || ui.helper;

Using jQuery 1.5.2 and jQuery UI 1.8.11.

fgeorgsson avatar Jun 15 '11 12:06 fgeorgsson