停止事件当外部事件在全日历中丢弃时重叠



我想停止事件重叠,当外部事件在jquery完整日历中下降时。我的事件丢弃代码如下:

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);
        },

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

你可能想要overlap.

若要为外部事件设置它,请将其添加为数据属性。使用jQuery,如下所示:

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

下面是使用与 FC 演示页面类似的代码的示例 Fiddle

相关内容

  • 没有找到相关文章

最新更新