tags:

views:

42

answers:

0

Hello!

Is there a way to render multiple months using FullCalendar, and enable users to drag an item/event from one month to another? I'd like to drag a scheduled event from, say, June into, say July (or August, etc)

I'm trying to see if this can be done by putting multiple calendars on a single page, and enabling drag-and-drop between them.

(If anyone has a better way to approach this problem, please let me know! :) )

I'm trying to modify the external-dragging.html example (available on at http://arshaw.com/js/fullcalendar/examples/external-dragging.html), but I'm not getting very far. Mostly this is because I'm not all that familiar with jQuery, nor am I familiar with FullCalendar.

What I have figured out is this: In the example, the "Draggable Events" panel on the left is populated with draggable items by specifying the items in HTML (statically, as part of the page), and then (in the jQuery onReady event) iterating over those static elements & adding the jQuery UI draggable ability into each. This works great because it's known (at Ready-time) how to clearly identify those elements.

When one of these jQuery UI dragables is dropped onto the Calendar, then the drop event/method is triggered. In this method the function retrieves the name of the calendar element (calendar event, actually), which it then uses to set up a new item on the calendar (ultimately this is done using the fullCalendar('renderEvent'...) line).

The example doesn't need to do anything else because FullCalendar allows for drag-and-drop internally (within a single calendar) using a mechanism that's different than the jQuery UI drag-and-drop (as far as I can tell)

I've copy-and-pasted the HTML for the calendar (so I have a second one, named #calendar2), and thought that if I just found a way to add the draggable ability to the items created in the first calendar's drop function, then everything should work fine. I tried adding in the following snippet to the end of the "drop" function in the example, but am running into the problem that the FullCalendar doesn't let the item/event be visible outside of the first calendar.

Is there a way to render multiple months using FullCalendar, and enable users to drag an item/event from one month to another?