javascript - FullCalendar refetchEvents not reloading calendar -
if ajax call create new event succeeds, reload pages fullcalendar. however, calling refetchevents seems have absolutely no effect - , watching network traffic in chrome shows no call being made url fullcalendar queries events. missing?
function submitnewevent(event) { event.preventdefault(); dnnevent = dnneventwithformdata(); $.ajax({ type: 'post', url: urlcreateevent, data: dnnevent }).success(function (response) { dialog.dialog('close'); $("#userevents").load(urluserevents); $("#calendar").fullcalendar('refetchevents'); }).error(function (response) { console.log(response); alert('failed'); }); }
try:
var mycal = $("#calendar)....init...
then in .success
:
mycal.fullcalendar('refetchevents');
Comments
Post a Comment