I've been using the ui-calendar for an application. But, today I've got a problem that when I change the month (for example, click the button and go from February to March and after this I go back) my events gone.
When I load:
When I Change:
When I Go Back:
The code config I've been using this time.
`
$scope.alertOnEventClick = function(date, jsEvent, view) {
console.log('evento clicado', date, jsEvent, view);
}
$scope.eventRender = function( event, element, view ) {
element.attr({'tooltip': event.title, 'tooltip-append-to-body': true});
$compile(element)($scope);
};
$scope.changeView = function(view,calendar) {
uiCalendarConfig.calendars[calendar].fullCalendar('changeView',view);
};
$scope.renderCalender = function(calendar) {
if(uiCalendarConfig.calendars[calendar]){
uiCalendarConfig.calendars[calendar].fullCalendar('render');
}
};
$scope.eventSources = [$scope.events];
$scope.uiConfig = {
calendar:{
lang: 'pt-br',
height: "parent",
editable: false,
theme:true,
header:{
left: '',
center: 'title',
right: 'today, prev,next'
},
eventClick: $scope.alertOnEventClick,
eventRender: $scope.eventRender
}
};
`