Closed rossjcooper closed 6 years ago
I have tried adding a refetchEvents
call on the $scope.dayClick()
function which has stopped the other events disappearing but now I get an obvious flicker while the events are being refetched and rendered, this is clearly not a permanent fix but it does clarify it may be more to do with ui-calendar
not handling eventSources
correctly as opposed to Angular binding going wrong somewhere.
$scope.dayClick = function(date, jsEvent, view) {
...
$('#myCalendar').fullCalendar('refetchEvents');
}
Try to add
stick=true
to each event
stick:true,
I'll give it a try but surely if the events are from event sources anyway surely they wouldn't disappear on rerendering
$scope.getAllTimelineByPOID = function (PurchaseOrderID) {
timelineService.getAllTimelineByPOID(PurchaseOrderID).then(function (res) {
if (res.data.length > 0) {
$scope.timelineList = formatDate(res.data, '', ["PlannedDate", 'ActualDate', 'LastModified']);
var calenderval = res.data;
//Cache= true;
angular.forEach(calenderval, /stick,/ function (value) {
$scope.events.push({
title: value.Description,
start: value.ActualDate
//Cache: true
//stick: true
//end: value.ActualDate,
//allDay: false
});
});
$scope.eventSources = [$scope.events];
console.log($scope.eventSources);
for (var i = 0; i < $scope.timelineList.length; i++) {
$scope.timelineList[i].ActualDate = new Date($scope.timelineList[i].ActualDate);
$scope.timelineList[i].LastModified = new Date($scope.timelineList[i].LastModified);
}
}
else {
$scope.timelineList.push($scope.timeline);
}
});
};
i'm facing same problem , help me out
I am finding that when an
eventSource
in myeventSources
array is changing some events from othereventSources
are disappearing from the calendar, it doesn't appear to be deleting the actual data because if I trigger a render by going back and forward a month in the view they reappear.It appears to happen in the
$scope.dayClick()
function, once this has been triggered 3+ times the$scope.projects
events disappear one at a time.