Javascript 无法重新呈现事件完整日历

Javascript 无法重新呈现事件完整日历,javascript,fullcalendar,Javascript,Fullcalendar,我试图通过更新服务器上的新数据来重置事件,但不起作用,我也不知道为什么。看起来一切都很好 我首先删除所有事件并向其中添加新源 多谢各位 $.ajax({ type: 'POST', url: '/time_slots/bulk', dataType: 'json', data: { time_slot: JSON.stringify(timeSlots), user_id: user_id }, success: funct

我试图通过更新服务器上的新数据来重置事件,但不起作用,我也不知道为什么。看起来一切都很好

我首先删除所有事件并向其中添加新源

多谢各位

$.ajax({
    type: 'POST',
    url: '/time_slots/bulk',
    dataType: 'json',
    data: {
      time_slot: JSON.stringify(timeSlots),
      user_id: user_id
    },
    success: function(timeSlots) {
      calendar.fullCalendar('removeEvents');
      timeSlots.forEach(function(el) {
        calendar.fullCalendar('renderEvent', el);
      });
      window.currentTimeSlots = timeSlots;
    }
});

抱歉,我忘记了事件的标题,因此无法正确呈现