Fullcalendar - 禁用重叠事件

时间:2011-08-17 18:51:54

标签: fullcalendar

我有一个日历,显示特定人的约会。如何设置完整日历,以便日历上的事件不会相互重叠?

由于

4 个答案:

答案 0 :(得分:3)

此选项自2.20

起纳入
eventOverlap: false

http://fullcalendar.io/docs/event_ui/eventOverlap/

答案 1 :(得分:2)

var events = $('#calendar').fullCalendar('clientEvents');

// start-time in between any of the events
if(eventStartDay > events[i].start && eventStartDay < events[i].end){
    return true;
}
//end-time in between any of the events
if(eventEndDay > events[i].start && eventEndDay < events[i].end){
    return true;
}
//any of the events in between/on the start-time and end-time
if(eventStartDay <= events[i].start && eventEndDay >= events[i].end){
    return true;
}

答案 2 :(得分:1)

选择时,您可以禁用重叠:

selectOverlap: false

当你拖放时:

eventOverlap: false

答案 3 :(得分:0)

我想最简单的方法是操纵事件源。也就是说,如果您使用的是可更改的源。