fullcalendar coliding事件

时间:2012-12-12 11:44:14

标签: fullcalendar

我正在使用FullCalendar插件来显示很多事件。虽然有时这些事件会像下图中那样放在彼此之上......任何人都知道如何预防它?

http://imageshack.us/photo/f/707/bugqp.png/

Feed:

events: [
{
    title: 'One event',
    start: new Date(y, m, d, 0, 30),
    end:  new Date(y, m, d, 2, 30),
    allDay: false
},
{
    title: 'One event',
    start: new Date(y, m, d, 0, 30),
    end:  new Date(y, m, d, 2, 30),
    allDay: false
},
{
    title: 'One event',
    start: new Date(y, m, d, 2, 30),
    end:  new Date(y, m, d, 4, 30),
    allDay: false
},
{
    title: 'One event',
    start: new Date(y, m, d, 2, 30),
    end:  new Date(y, m, d, 4, 30),
    allDay: false
},
{
    title: 'One event',
    start: new Date(y, m, d, 2, 30),
    end:  new Date(y, m, d, 4, 30),
    allDay: false
},

{
    title: 'One event',
    start: new Date(y, m, d, 1, 00),
    end:  new Date(y, m, d, 3, 00),
    allDay: false
},

{
    title: 'One event',
    start: new Date(y, m, d, 1, 30),
    end:  new Date(y, m, d, 3, 30),
    allDay: false
},
{
    title: 'One event',
    start: new Date(y, m, d, 2, 50),
    end:  new Date(y, m, d, 4, 50),
    allDay: false
},
{
    title: 'One event',
    start: new Date(y, m, d, 4, 30),
    end:  new Date(y, m, d, 6, 30),
    allDay: false
},
{
    title: 'One event',
    start: new Date(y, m, d, 2, 00),
    end:  new Date(y, m, d, 4, 00),
    allDay: false
},

{
    title: 'One event',
    start: new Date(y, m, d, 2, 50),
    end:  new Date(y, m, d, 4, 50),
    allDay: false
},

{
    title: 'One event',
    start: new Date(y, m, d, 2, 50),
    end:  new Date(y, m, d, 4, 50),
    allDay: false
},      
{
    title: 'One event',
    start: new Date(y, m, d, 4, 00),
    end:  new Date(y, m, d, 6, 00),
    allDay: false
}               
]

1 个答案:

答案 0 :(得分:0)

v1.6.4中引入了一个AgendaView选项。来自the docs

slotEventOverlap 1.6.4

确定议程视图中的定时事件是否应在视觉上重叠。

Boolean, default: true

设置为true(默认值)时,事件将相互重叠。每个活动最多只有一半会被遮挡。

设置为false时,绝对不会重叠。