当fullcalendar中的外部事件丢失时停止eventOverlap

时间:2015-02-03 08:20:09

标签: angularjs jquery-plugins fullcalendar

当jquery fullcalendar中的外部事件丢失时,我想停止eventOverlapping。 我的事件代码如下:

drop: function (date, allDay) { // this function is called when something is dropped
            eventID += 1;
            // retrieve the dropped element's stored Event Object
            var originalEventObject = $(this).data('eventObject');
            // we need to copy it, so that multiple events don't have a reference to the same object
            var copiedEventObject = $.extend({}, originalEventObject);
            // assign it the date that was reported
            copiedEventObject.start = date;
            copiedEventObject.allDay = allDay;
            copiedEventObject.id = eventID;
            // render the event on the calendar
            $("calendarformyabsence").fullCalendar('renderEvent', copiedEventObject, true);

        },

1 个答案:

答案 0 :(得分:0)

overlapevent属性。 eventOverlap是一个回调函数,可用于动态允许/禁止重叠。

您可能想要overlap

要将其设置为外部事件,请将其添加为数据属性。使用jQuery看起来像:

$('#external-event').data('event', {
    overlap: false,
    // and any other options
    title: "event"
});

以下示例 Fiddle 使用与FC demo page类似的代码。