title: AngularJS ui-calendar – model with events
body: <p>I’m trying to set up a calendar according to the instructions. The calendar itself shows up on the page, but it doesn’t display any events.</p>
  
  <p>Code in template:</p>
  
  <p><code>&lt;div ui-calendar ng-model="eventSources"&gt;</code></p>
  
  <p>Code in my controller:</p>
  
  <pre><code>var date = new Date();
  var d = date.getDate();
  var m = date.getMonth();
  var y = date.getFullYear();
  
  $scope.eventSources = [
      {
      "title": 'All Day Event',
      "start": new Date(y, m, d)},
  {
      "title": 'Long Event',
      "start": new Date(y, m, d - 5),
      "end": new Date(y, m, d - 2)}];
  </code></pre>
  
  <p>When I loop through eventSources in the template it works:</p>
  
  <pre><code>&lt;li ng-repeat="e in eventSources"&gt;
      {{e.title}} {{e.start}}
  &lt;/li&gt;
  </code></pre>
  
  <p>The calendar doesn’t show anything, though. There are no errors in console, too. Does any of you has an idea of what’s going on here?</p>