当我加载两个事件时,我收到了一个不稳定的事件行为,eventSources其中一个被定义为渲染:背景。
生成的 JSON 是正确的,因为在eventSources使用正常渲染定义两者时,一切正常。
指示的行为包括以下症状:
一些未呈现的事件(它们总是从不是背景的日历中消失,也不会出现在 DOM 中)
显示为正常事件的后台事件
在每次按下上一个/下一个时,行为可能会有所不同。
这是我加载事件的代码:
$('#workshifts_ocupations_calendar').fullCalendar({
defaultView: 'agendaWeek',
eventSources: [
{
id: "workshiftSource",
url: '<?= base_url(); ?>turno/ajax_load_workshifts_by_installation/'+installation,
editable:true,
success: function(){
console.log("turnos");
}
},
{
id: "backSource",
url: '<?= base_url(); ?>ocupacion/ajax_load_ocupations_by_installation/'+installation,
rendering: 'background',
editable:false,
success: function(){
console.log("fondos");
}
}
],
eventRender: function(event, element) {
// Si es background - Mostramos el título.
if(event.source.rendering == "background"){
element.html('<span class="backgroundEventsTitle">' + event.title + "</span>");
}
},
locale: 'es', …Run Code Online (Sandbox Code Playgroud)