ui-calendar
ui-calendar copied to clipboard
Event disappear after switching months and after hitting today
$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;
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);
}
});
};