How to refresh event Calendar after DB update?

I’m trying to figure out how to refresh the event calendar after the user has inserted a new event. I’ve tried both of the following and I don’t know what these are supposed to do but they don’t actually reload the event calendar.


This is how I’m initializing the calendar. So how do I refresh it?

$(function () {

  //<!--*** Initialize event calendar

  var inst = $('#staffschedule').mobiscroll().eventcalendar({
        display: 'inline',
        showEventCount: 'true',
        theme: 'ios',
        themeVariant: 'light',
        view: {
            calendar: {
                labels: true,
                type: 'week',
                popover: true
            eventList: {type: 'week', scrollable: true}
        onEventSelect: function (event, inst) {
                message: event.event.text
        onBeforeShow: function (event, inst) {
          alert("before show");

      mobiscroll.util.getJson('get-staffschedule.json.php?staffid=<?=$staffid?>', function (events) {
      }, 'json');


Hi Vincent,

For updating the events dynamically you should use the setEvents method. The refresh method refreshes the calendar ui, but it doesn’t update the events.