title: JQM Calendar is not refreshing after Add Event or Delete Event
body: <p>I am using following calendar plugin in my phonegap application <a href="https://github.com/JWGmeligMeyling/jqm-calendar" rel="nofollow">https://github.com/JWGmeligMeyling/jqm-calendar</a> for calendar events</p>
  
  <p>I my application I allowed the user to add event the event and the added event will be saved to Database for feature use and also allow the user to delete the event from the server with the help of services</p>
  
  <p>If the user add or delete the event means I will reload my array and refresh the calendar.</p>
  
  <p>If I reload the the array and refresh the calendar means it is not refreshing until I click the next or previous button</p>
  
  <p>I am using following line to refresh my calendar in <strong>pageshow</strong></p>
  
  <p>Refresh code : <strong>$("#calendar").trigger('refresh');</strong></p>
  
  <p>To  illustrate the issue clearly I have page show attached my code  below</p>
  
  <pre><code>$.mobile.document.on( "pagebeforeshow", "#view-calendar", function() {
  
  if(vcal){
  alert("pgshow");
  $("#calendar").trigger('refresh');
  }
  $('#addcal').on( "tap", function( event ) {
  eventflag=false;
  $.mobile.changePage("#add-calendar");
  });
  $.mobile.loading( 'show');
  
  var eventsss;
  var uid= localStorage.getItem('uid');
  
  var ss='data={"uid":"'+uid+'"}';
  
  $.ajax({
  url:"http://trendy.twomini.com/pinapp/index.php/version/listevent",
  type:'POST',
  data:ss,
  cache: true,
  dataType: 'text',
  crossDomain: true,
  ContentType:"application/x-www-form-urlencoded; charset=UTF-8",
  error: function(XMLHttpRequest,textStatus, errorThrown) {
  var res=JSON.stringify(XMLHttpRequest);
  var datareg = JSON.parse(res);
  console.log(datareg);
  $("#calendar").jqmCalendar();
  },
  success: function (data) {
  $.mobile.loading( 'hide');
  var data=eval('('+data+')');
  eventnamearr=[];
  
  
  var startdate;
  var enddate;
  $.each(data.msg, function(i,item){
  
  var str =item.start_date;
  var str1 =item.end_date;
  var res = str.split(" ");
  var res1 = str1.split(" ");
  
  var id=item.id;
  
  
  startdate=res[3]+'-'+convertMonthNameToNumber(res[1])+'-'+res[2]+' '+res[4];
  enddate=res1[3]+'-'+convertMonthNameToNumber(res1[1])+'-'+res1[2]+' '+res1[4];
  
  
  eventsss={"summary":item.event_name,"begin":new Date(startdate),"end":new Date(enddate),"id":item.id,"location":item.location};
  eventnamearr.push(eventsss);
  
  
  
  
  
  });
  $("#calendar").jqmCalendar({
  events : eventnamearr, // Point to the events array now
  months : ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
  days : ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
  startOfWeek : 0
  });
  
  
  }
  
  });
  });
  </code></pre>