title: Fullcalendar.io issue in parsing events properties as function
body: <p>As per the <a href="https://fullcalendar.io/docs/events-function" rel="nofollow noreferrer">docs of fullcalender.io</a>, I am trying to call API everytime it triggers events like previous, next, month, day or list view. The event is totally working fine in my case. I can call the API and every event and collect the data in an array called <code>sessionCalendar[]</code>. After the API is called I can see the array has data.</p>
  
  <p><a href="https://i.stack.imgur.com/feHGa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/feHGa.png" alt="enter image description here"></a></p>
  
  <pre><code>    calendar_view_session: function(){
  
      var calendarEl = document.getElementById('calendar');
  
      var calendar = new FullCalendar.Calendar(calendarEl, {
        plugins: [ 'dayGrid', 'timeGrid', 'list', 'interaction' , 'momentTimezone' ],
        header: {
          left: 'prev,next today',
          center: 'title',
          right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
        },
        defaultDate: '2019-04-12',
        navLinks: true, // can click day/week names to navigate views
        editable: false,
        eventLimit: true, // allow "more" link when too many events
        events:  function(info, successCallback,failureCallback) {
              console.log(info);
  
              var date1 = new Date(info.start.valueOf());
              var date2 = new Date(info.end.valueOf());
  
              var callData = {
                  from_date:moment.tz(date1, timeZone).format('YYYY-MM-DD'),
                  to_date: moment.tz(date2, timeZone).format('YYYY-MM-DD')
              }
              sessionCalendar = [];
              console.log(callData);
              $.ajax({
                    url:app.createApiPath(apiController_data,apiAction_data),
                    method:"POST",
                    dataType: "json",
                    data: {
                          callData: JSON.parse(JSON.stringify(callData)),
                          api_version: 1,
                          deviceType: 'web'
                      },
                    success: function(responseData){
                      console.log({responseData})
                      app.calendarParse(responseData.data.results);
                  }
              })
  
            },
            //sessionCalendar
      });
  
      calendar.render();
  
  },
  </code></pre>
  
  <p>This is where I am pushing all my results into array. Note I have minimize the code inorder to make it short as possible.</p>
  
  <pre><code>calendarParse: function(apiData){
  
          for(var i=0; i&lt;apiData.length; i++){
  
              const { bookingId, course, customers, end_date_time, id, lm_firstname, lm_lastname,localmasterId, meeting_id, meeting_type, payout, request_payout_status, sessionDate, session_status, start_date_time, status,attributes }     = apiData[i];
  
              sessionCalendar.push(
                      {
                          title: `${course["course_name"]}`,
                          start: gbl.datetime_utc(start_date_time),
                          end: gbl.datetime_utc(end_date_time),
                          customers: customersName,
                          localmasterName: lm_firstname + " " + lm_lastname,
                          sessionStatus: session_status,
                          meetingType: meetingtype,
                          payoutStatus: request_payout_status,
                          sessionDate: sessionDate,
                          startTime: gbl.datetime(start_date_time),
                          endTime: gbl.datetime(end_date_time)
                      },
                  )
  
          }
  
  
  },
  </code></pre>
  
  <p>But I cannot see the event in calendar. What is wrong here. Before I was using <a href="https://fullcalendar.io/docs/events-array" rel="nofollow noreferrer"><code>event</code> properties with array</a> and it was working fine. Now when I am using <a href="https://fullcalendar.io/docs/events-function" rel="nofollow noreferrer"><code>event</code> function</a> it is not working.</p>
  
  <p>All the days feilds are blank. Please help.</p>