dayrender fullcalendar 功能在我的解决方案中不起作用

问题描述

我正在使用 JS fullcalendar.I've found this code :

            $('#calendar').fullCalendar({
           header: {
            left: 'prev,next today',center: 'title',right: 'month,basicWeek,basicDay'
       },defaultview: 'month',dayRender: function (date,cell) {
        var id = 'checkBox-2-' + (date.getTime() / 1000).toFixed(0);
        var exists = selectedDays.indexOf('checkBox-2-' + (date.getTime() / 1000).toFixed(0));
        if (exists > -1) {
            cell.append('<input id="' + id + '" type="checkBox" class="checkBox" checked/>');
        }
        else{
            cell.append('<input id="' + id + '" type="checkBox" class="checkBox"/>');
        }
    $('#'+id).change(function() {
    if($(this).is(":checked")) {              
        selectedDays.push($(this).attr('id'));        
    }
    else{
        
        var index = selectedDays.indexOf($(this).attr('id'));            
        if (index > -1) {
            selectedDays.splice(index,1);
        }
    }
 });
   
}
});

但是 dayrender 功能对我不起作用,不显示日历网格,而只显示标题(今天、下一个等)。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)