title: fullcalendar: is there a way to call dayRender only after i load my events via events function
body: <p>i'm using fullcalendar in a web application i"m building.</p>
  
  <p>i load my events with <a href="https://fullcalendar.io/docs/event_data/events_function/" rel="nofollow noreferrer">events function</a> and ajax.</p>
  
  <p>here is my code:</p>
  
  <pre><code>var ajaxData;
  var eventsJsonArray;
  var json_backgrundColor;
  var json_iconstring;
  
  //alert('Hello! 1!');
  $(document).ready(function () {
  
      $('#calendar').fullCalendar({
          header: {
              left: 'prev',
              center: 'title',
              right: 'next,month,agendaWeek,agendaDay'
          },
          //custom events function to be called every time the view changes
          events: function (start, end, timezone, callback) {
              var mStart = start.format('M')
              var yStart = start.format('YYYY')
              $.ajax({
                  url: '$getMonthDataUrl',
                  type: 'GET',
                  data: {
                      startDate: start.format(),
                      endDate: end.format()
                  },
                  error: function () {
                      alert('there was an error while fetching events!');
                  },
                  success: function (data) {
                      alert('nice!!');
                      ajaxData = data;
                      json_iconstring = ajaxData['iconString'];
                      json_backgrundColor = ajaxData['Calendar_cell_background_color'];
                      eventsJsonArray = ajaxData['all_Events_For_The_Month'];
                      callback(eventsJsonArray); //pass the event data to fullCalendar via the supplied callback function
                  }
              });
          },
          fixedWeekCount: false,
          showNonCurrentDates: false,
  
          dayRender: function (date, cell, view) {
              console.log(json_backgrundColor);//this brings eror because json_backgrundColor is undefined 
              var cellDate = date.format('D');
              if (date.format('M') == view.start.format('M')) //cheacking is this day is part of the currrent month (and not prev/next month)
              {
                  alert(cellDate);
                  cell.css('background-color', json_backgrundColor[cellDate]);//this brings eror because json_backgrundColor is undefined 
  
              }
  
  
          },
      })
  
  });
  </code></pre>
  
  <p>when i load my events via ajax i'm also getting the information about which background color each cell should get. i can only get this info via the events ajax request.</p>
  
  <p>the problem is that when the dayRender is running, i still don't have the background color data. (json_backgrundColor is undefined).</p>
  
  <p>is there a way that dayRender will run after the events calendar will stop running? or any other code that will fix my problem.</p>
  
  <p>many thanks!!  </p>