title: How to rerender Fullcalendar events
body: <p>I've been trying for days to filter my fullcalendar and it still doesn't work properly. I've managed now at least to have 2 different calendars based on the page you are on (homepage or a different one with different events). So on the second one I have 2 dropdowns with lists. I've managed to pick the id of the selected item from the dropdown and I'm trying to give it as a parameter to my axios function so that the fullcalendar events has the json that I want. However if you change the type of the event (I have location as a type) then it doesn't update the change. So basically it initializes fine with the right events but if you have 2 types and want to change them from the dropdown it doens't do anything.</p>
  <p>Here is the axios function:</p>
  <pre><code>events: async function () {
                  if (window.location.href.startsWith(window.origin + &quot;/Booking&quot;)) {
  
                      var data = await axios.get(&quot;/Booking/GetBookingsFiltered/&quot;, {
                          params: {
                              locationIDparam: locationSelected(), // doesn't update when you change it
                              carIDparam: carSelected(),
                          }
                      })
  
                      //calendar.events = data.data; some things I've tried and don't work
                      //calendar.rerenderEvents();
                      //calendar.render();
  
                      return data.data;
                  } else { 
                      var data = await axios.get(&quot;/Booking/GetBookingsByUser/&quot;) // this works
                      return data.data;
                  }
              }
  </code></pre>
  <p>In case you need the code for how I get the parameters:</p>
  <pre><code>function locationSelected() {
          var location = document.getElementById(&quot;location_filter&quot;);
          var selected_location = location.options[location.selectedIndex].value;
          console.log(&quot;You selected location: &quot; + selected_location);
          return selected_location;
          //$(&quot;#calendar&quot;).fullCalendar('renderEvent');
          //$('#calendar').fullCalendar('rerenderEvents');
      }
  
      function carSelected() {
          var car = document.getElementById(&quot;car_filter&quot;);
          var selected_car = car.options[car.selectedIndex].value;
          console.log(&quot;You selected car: &quot; + selected_car);
          return selected_car;
      }
  </code></pre>
  <p>I've tried using $(&quot;#calendar&quot;).fullCalendar('renderEvent');, $(&quot;#calendar&quot;).fullCalendar('rerenderEvent'); $(&quot;#calendar&quot;).fullCalendar().render(); idk nothing I find online or in the documentation of fullcalendar work....please help</p>