如何删除完整日历的listMonth中的unknownResourceEvents

时间:2019-03-12 05:11:07

标签: fullcalendar fullcalendar-scheduler

我将事件添加到带有资源的全日历中,在timelineMonth中它仅显示资源事件,而在ListMonth中则显示unKnownResources事件。我的报价是如何在fullcalendar的listMonth中删除unKnownResources事件。

$(function() { // document ready

  $('#calendar').fullCalendar({

    now: '2019-03-12',
    editable: true,
    scrollTime: '00:00',
    header: {
      left: 'today prev,next',
      center: 'title',
      right: 'timelineMonth,listMonth'
    },
    defaultView: 'timelineMonth',
    views: {
      timelineThreeDays: {
        type: 'timeline',
        duration: {
          days: 3
        }
      }
    },
    //resourceGroupField: 'building',
    slotDuration: '24:00',
    resources: [{
      id: 'a',
      title: 'Auditorium A',
    }, {
      id: 'b',
      title: 'Auditorium B',
      eventColor: 'green'
    }],
    events: [{
      id: '1',
      resourceId: 'b',
      start: '2019-03-01T02:00:00',
      end: '2019-03-01T07:00:00',
      title: 'event 1'
    }, {
      id: '2',
      resourceId: 'a',
      start: '2019-03-02T05:00:00',
      end: '2019-03-02T22:00:00',
      title: 'event 2'
    }, {
      id: '3',
      resourceId: 'c',
      start: '2019-03-03',
      end: '2019-03-03',
      title: 'event 3'
    }, {
      id: '4',
      resourceId: 'c',
      start: '2019-03-04T03:00:00',
      end: '2019-03-04T08:00:00',
      title: 'event 4'
    }, {
      id: '5',
      resourceId: 'a',
      start: '2019-03-04T00:30:00',
      end: '2019-03-04T02:30:00',
      title: 'event 5'
    }]
  });

});

链接---> https://jsfiddle.net/mzsek8ov/1/

谢谢

0 个答案:

没有答案