6
Version : Fullcalendar-Scheduler v5 beta2

I tried eventRender like below in chrome:

document.addEventListener('DOMContentLoaded', function() {
    var calendarEl = document.getElementById('planningMix');
    var planningMix = $(calendarEl);
    var calendar = new FullCalendar.Calendar(calendarEl, {
        //...
        eventRender: function(info) {
            debugger
          },
        events: function(d, successCallback, failureCallback) {
           //...
        }
    });

    calendar.render();
});

When I run this code, "debugger" didn't fired. eventRender has became another name in V5 ?

4

1 回答 1

1

那些打算从 V4 升级到 V5 的人,请查看此文档 upgrade -from-v4,升级时需要考虑许多更改。

事件内容示例

eventContent: function (arg) {

            var event = arg.event;
            
            var customHtml = '';
            
            customHtml += "<span class='r10 font-xxs font-bold' style='overflow: hidden;'>" + event.title + "</span>";
            
            customHtml += "<span class='r10 highlighted-badge font-xxs font-bold'>" + event.extendedProps.age + text + "</span>";
                          

            return { html: customHtml }
        }
于 2021-12-30T11:48:55.210 回答