The onAutoRefresh event handler fires at the interval specified by DayPilot.Month.autoRefreshInterval when auto refresh is enabled.
In ASP.NET WebForms, ASP.NET MVC, and Java versions, it fires before the server-side event.
DayPilot.Month.onAutoRefresh(args)args.i - ordinal number of the current auto refresh call
args.preventDefault() - cancels the current auto refresh call
JavaScript
const month = new DayPilot.Month("dp", {
onAutoRefresh: (args) => {
month.events.load("/getEvents");
},
// ...
});
month.init();Angular
<daypilot-month [config]="config"></daypilot-month>config: DayPilot.MonthConfig = {
onAutoRefresh: (args) => {
console.log(args.i);
},
// ...
};React
<DayPilotMonth
onAutoRefresh={onAutoRefresh}
{/* ... */}
/>const onAutoRefresh = (args) => {
console.log(args.i);
};Vue
<DayPilotMonth
@autoRefresh="onAutoRefresh"
<!-- ... -->
/>const onAutoRefresh = (args) => {
console.log(args.i);
};AutoRefresh [doc.daypilot.org]