eventReceive 2.2

Called when an external element, containing event data, is dropped on the calendar.

function( event ) { }

This function is triggered after the drop callback has been called and after the new event has already been rendered on the calendar. event is the Event Object associated with the dropped element.

The droppable setting must be activated and the necessary jQuery UI requirements must be fulfilled.

The eventDrop callback does not get called when an external event is dragged onto the calendar.

Associating Event Data

To make a normal draggable element represent an event, the element must have "data" associated with it, labeled as "event". It must be 1, true, or an object. This can be done through jQuery's data method in JavaScript:

$('.draggable').data('event', { title: 'my event' });

Or through an HTML5 data attribute:

<div class='draggable' data-event='{"title":"my event"}' />

If done through an HTML5 attribute, make sure it is valid JSON! For example, property names must be enclosed in double quotes! For more information, see parseJSON.

In the provided object, any of the Event Object properties can be specified. There are a few additional properties that provide special functionality:

start or time
A time-of-day an event should start if dragged onto a whole day. A Duration-ish input like '09:00' (9am).
duration
The the duration of the event when dropped. A Duration-ish input like '03:00' (3 hours). If not specified, defaultAllDayEventDuration or defaultTimedEventDuration will apply.
stick
Whether the event should persist after the initial render. See the stick flag in the renderEvent method.

These special properties can either be specified in the provided event object, or they can be standalone data attributes:

<div class='draggable' data-event='1' data-duration='03:00' />

Overlapping and Constraining

When there is event data associated with the drag, normal event overlap/constraint rules apply, such as eventOverlap and eventConstraint.