选择日期后进行全日历填充事件

时间:2019-07-12 10:18:08

标签: fullcalendar fullcalendar-4

我正在使用fullcalendar v4。在演示中,我看到我们如何选择日期,并且它是更新事件。我要一样但是我没有任何方法来更新事件。我尝试feed event as function,但是选择日期时我看不到它被触发。

        var calendarEl = document.getElementById('calendar');
    var calendar = new FullCalendar.Calendar(calendarEl, {
      plugins: [ 'dayGrid', 'timeGrid', 'list', 'interaction'  ],

      header: {
        left: 'today',
        center: 'title',
        right: 'timeGridWeek'
      },
    defaultView: 'timeGridWeek',
    selectable: true,
    selectMirror:true,
    selectOverlap: true,
    navLinks: true, // can click day/week names to navigate views
    editable: true,
    eventLimit: true, // allow "more" link when too many events
    select: function(selectionInfo){
        console.log(selectionInfo)
    },
    events: 
    events: function(info, successCallback, failureCallback) {
        console.log({info}, {successCallback}, {failureCallback});
    }
    ,

    });
    calendar.render();

0 个答案:

没有答案