ui-calendar
ui-calendar copied to clipboard
No display, No error, when ng-model="eventSources" is specified in the HTML element
In the view, this :
<div ui-calendar></div>
show an empty calendar
but that (with $scope.eventSources=[] in the controller
):
<div ui-calendar ng-model="eventSources"></div>
shows nothing (I can see the ngModel required error, though).
What do I miss please?
This is my specification :
<div calendar="calendar" ui-calendar="uiConfig.calendar" class="span8 calendar" ng-model="eventSources"></div>
What is the error?
I also have same problem like this.
"ng-model is not bind with ui-calender"
I give some data in controller but it is not showing in calendar. But I print in the console, the data comes.
<div ui-calendar="uiConfig.calendar" ng-model="eventSources">
$scope.events = [
{title: 'All Day Event',start: new Date(y, m, 1)},
{title: 'Long Event',start: new Date(y, m, d - 5),end: new Date(y, m, d - 2)},
{id: 999,title: 'Repeating Event',start: new Date(y, m, d - 3, 16, 0),allDay: false},
{id: 999,title: 'Repeating Event',start: new Date(y, m, d + 4, 16, 0),allDay: false},
{title: 'Birthday Party',start: new Date(y, m, d + 1, 19, 0),end: new Date(y, m, d + 1, 22, 30),allDay: false},
{title: 'Click for Google',start: new Date(y, m, 28),end: new Date(y, m, 29),url: 'http://google.com/'}
]
$scope.eventSources = [$scope.events];