Полный календарный шедулер с очень длинным ресурсом - PullRequest
0 голосов
/ 02 июля 2018

У меня проблемы с отображением вертикального планировщика.

это то, что я использую:

$('#timetable').fullCalendar({
        schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives',
        editable: true,
        resourceAreaWidth: "100px",
        defaultView: 'timelineMonth',
        slotLabelFormat: ['MMMM','D'],
        eventAllow: function(dropLocation, draggedEvent) {
            var originalEvent = $('#timetable').fullCalendar('clientEvents', draggedEvent.id)[0]
            return dropLocation.start.isSame(originalEvent.start) && dropLocation.end.isSame(originalEvent.end)
        },
        header: {
            left: 'today prev,next',
            center: 'title',
            right: 'timelineWeek,timelineMonth,agendaToDisplayFourWeek'
        },
        views: {
            agendaToDisplayFourWeek: {
                type: 'timeline',
                slotDuration: {hours: 12}, 
                duration: { month: 3 }
            },
            timelineMonth: {
                eventOverlap: false,
                slotDuration: {hours: 24},
                slotLabelInterval: {days: 1},
                type: 'timeline',

            },
            timelineYear: {
                eventOverlap: false,
                slotDuration: {hours: 1},
                slotLabelInterval: {days: 1},
            },

        },
        resources: [
        { id: 'a',  title: 'Bahamas' },
        { id: 'b',  title: 'Longbeach' },
        { id: 'c',  title: 'Mentawai' },
        { id: 'd',  title: 'Wau' },
        { id: 'e',  title: 'Sin asignar' },
        { id: 'e1',  title: 'Sin asignar' }
        ],
        events: [
        { id: '1', resourceId: 'e', start: '2018-07-01', end: '2018-07-10', title: 'event 1' },
        { id: '6', resourceId: 'e', start: '2018-07-01', end: '2018-07-10', title: 'event a' },
        { id: '2', resourceId: 'e', start: '2018-07-01', end: '2018-07-10', title: 'event 2' },
        { id: '3', resourceId: 'e', start: '2018-07-01', end: '2018-07-10', title: 'event 3' },
        { id: '4', resourceId: 'e', start: '2018-07-01', end: '2018-07-10', title: 'event 4' },
        { id: '5', resourceId: 'e', start: '2018-07-01', end: '2018-07-10', title: 'event 5' }
        ]
    });

это дает следующий результат: https://codepen.io/monxas/pen/VdRwwM?editors=0010

как видите, в нижней части есть непреднамеренное поведение.

...