Is there a way to prevent overlapping events in jQuery FullCalendar?

前端 未结 10 2103
伪装坚强ぢ
伪装坚强ぢ 2020-12-01 03:47

Is there a way to prevent overlapping events in jQuery FullCalendar?

10条回答
  •  天命终不由人
    2020-12-01 04:07

    Just add

    eventOverlap: false
    

    as one of your options outside of the events element.

    You can also add the option

    overlap
    

    to a single event, which will override the eventOverlap on that single event.

    events: [
                            {
                                title  : 'event1',
                                start  : '2017-05-27'
                            },
                            {
                                title  : 'event2',
                                start  : '2017-05-28',
                                end    : '2017-05-29'
                            },
                            {
                                title  : 'event3',
                                start  : '2017-05-30T12:30:00',
                                allDay : false, // will make the time show
                                draggable: true,
                                editable: true,
                                overlap: true,
                            },
                            {
                                title  : 'event3',
                                start  : '2017-05-30T09:30:00',
                                allDay : false, // will make the time show
                                draggable: true,
                                editable: true,
                            }
                        ],
                        eventOverlap: false
    

提交回复
热议问题