title: FullCalendar - adding events dynamically not working
body: <p>Dynamic data is not being added to the events in fullCalendar. I am using AJAX here to get a response and I store it in my "events" array:</p>
  
  <pre><code>events: function () {
      var events = [];
      jQuery.ajax({
        url: '/employee/leave/2',
        type: 'GET',
        dataType: 'json',
        data: '',
        success: function (doc) {
          console.log(doc)
  
          if (doc != null) {
            events.push({
              id: doc.id,
              title: doc.reason,
              start: "2018-5-22",
              // end: doc.to_date
            });
          }
        }
      });
  },
  </code></pre>