You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the user creates a event and save it to database, just refreshing the page isn't enough to update the calendar, because the browser keeps the cache after loading a month.
JQuery has a option to disable the cache - cache : false - and will be great if it's available through the ajax option on calendar initialization.
And taking the opportunity... is there a way to do a "refresh" in the calendar, i.e., do a new ajax call to reload the events from the current month with the updated ones from the database?
The text was updated successfully, but these errors were encountered:
I'm currently working on v2 of the calendar and have incorporated your comments in this version. Thank you for your feedback!
The new v2 ajax setting can be string containing the URL to which the request is sent. In this case the cache is disabled: cache: false. Alternatively you can use a jQuery ajax settings object for more flexibility.
var ajaxSettings = this.settings.ajax;
if (null !== ajaxSettings) {
if (typeof ajaxSettings === 'string') {
ajaxSettings = {
type: 'GET',
url: ajaxSettings,
cache: false
};
}
}
The v2 calendar emits custom events and has an extended api for more flexibility. You can refresh the data with zabuto_calendar('data') and listen to events calendar:data and calendar:data-fail.
var $el = $('#calendar');
$el.zabuto_calendar();
$el.zabuto_calendar('data');
$el.on('calendar:data', function (event) {
/* do stuff */
});
When the user creates a event and save it to database, just refreshing the page isn't enough to update the calendar, because the browser keeps the cache after loading a month.
JQuery has a option to disable the cache -
cache : false
- and will be great if it's available through theajax
option on calendar initialization.And taking the opportunity... is there a way to do a "refresh" in the calendar, i.e., do a new ajax call to reload the events from the current month with the updated ones from the database?
The text was updated successfully, but these errors were encountered: