seankenny / fullcalendar

Full-sized drag & drop event calendar (jQuery plugin)
http://arshaw.com/fullcalendar/
MIT License
60 stars 39 forks source link

Dragging/Resizing not working #57

Closed victor-sopot closed 2 years ago

victor-sopot commented 9 years ago

Great extension to an already fantastic jquery plugin man just what i needed for my project!

I seem to be having a javascript error though, i am grabbing event and resource data with an Ajax pull as well as updating whenever an event is resized or moved. But events do not move at all and in console i am given this:

Uncaught TypeError: eventElement.draggable is not a function - fullcalendar.js:7469

I've tried removing the eventDrop option completely.. at first i didn't have jquery-ui linked but then I enabled it and still nothing.. bit confused to be honest. Any ideas? If code snippets are required please let me know

victor-sopot commented 9 years ago

I updated to 2.1.1 from the master branch and i get a different error now when i click anywhere on the calendar:

Uncaught TypeError: Cannot read property 'indexOf' of undefined

Also, under the Network tab of dev tools the ajax call to bring in resources seems to be looping like 15 times, any idea why this is happening?

iRoachie commented 9 years ago

+1

HriBB commented 8 years ago

+1

HriBB commented 8 years ago

I think that the problem is jquery-ui. It triggers a resize event on the calendar event div, which bubbles up all the way to window object, so when we do something like $(window).resize() it fires when we do resize.

Easy fix is

$(window).resize(function(e){
    if (e.target === window) {
        $('#calendar').fullCalendar('option', 'height', getCalendarHeight());
    }
});