且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

jquery完整日历:回调“之后”日历已完全加载

更新时间:2023-12-04 23:00:04

可以自己添加。更新 fullcalendar.js 中的函数 render 就像这样

Actually you can add it by yourself. Update the function render in the fullcalendar.js like this

function render(inc) {
    if (!content) {
        initialRender();
        trigger('complete', null, true);
    }else{
        calcSize();
        markSizesDirty();
        markEventsDirty();
        renderView(inc);
        trigger('complete', null, true);
    }
} 

并添加到初始调用回调函数:

And add to the initial call callback function:

$('#calendar').fullCalendar({
         editable: true,
         complete: function() {alert('complete');}, 

    complete: function() {
        var events = $(this).fullCalendar('clientEvents');
        for(var i in events)
        {
            alert(events[i].title);
        }
    },