禁用在议程日视图中拖动到另一天(fullCalendar)

时间:2019-05-21 15:12:59

标签: jquery fullcalendar fullcalendar-scheduler

如何在fullCalendar中禁用拖动到另一天?我使用议程日,并且只需要一天,但是当我在最上面放下毒品事件时,它们就会拖到另一天。

$('#calendar').fullCalendar({
    header: {
        left: '',
        center: '', //title
        right: ''
    },
    defaultTimedEventDuration: '01:00:00',
    allDaySlot: false,
    //titleFormat: '[Hello, World!]',
    schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source',
    defaultView: 'agendaDay',
    groupByResource: true,
    eventOverlap: false,
    resources: [
        {id: '0', title: '0'},
        {id: '1', title: '1'},
        {id: '2', title: '2'},
        {id: '3', title: '3'},
        {id: '4', title: '4'},
        {id: '5', title: '5'},
        {id: '6', title: '6'}
    ],
    unselectAuto: false,
    selectable: true,
    selectHelper: false,
    editable: true,
    droppable: true, // this allows things to be dropped onto the calendar
    dayClick: function (date) {
        alert('clicked ' + date.format());
    },
    select: function (startDate, endDate) {
        alert('selected ' + startDate.format() + ' to ' + endDate.format());
    },
    events: [],
    eventClick: function (info) {
        console.log(info);
    }
});

https://codepen.io/serhii-danovsky/pen/pmWweq

但是我想要

enter image description here

0 个答案:

没有答案