AngularJS UI-calendar not updating events on Calendar

前端 未结 11 2348
[愿得一人]
[愿得一人] 2020-12-10 04:52

I am using Angular UI-Calendar to show some events on the Calendar. The events are showing fine on the Calendar. But when I update any event\'s details, the event\'s detail

11条回答
  •  盖世英雄少女心
    2020-12-10 05:12

    I was having some similar issues where events weren't being refetched after emptying my "eventSource" array ($scope.eventSources = [$scope.completedEvents]) and repopulating it with new events. I was able to overcome this at first by calling 'removeEvents',

    uiCalendarConfig.calendars.calendar.fullcalendar('removeEvents')
    

    This is hackish, so after further tinkering I found that events were refetched when my child array is modified,

    $scope.completedEvents.splice(0, $scope.completedEvents.length)
    

    After reviewing the source, I can see that the eventSource array is being watched, but the 'refetch' is never occurring. furthermore, I was never able to get the following to work,

    uiCalendarConfig.calendars.calendar.fullcalendar('refetchEvents')
    

提交回复
热议问题