DayPilot.Month.onAutoRefresh

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.

Declaration

DayPilot.Month.onAutoRefresh(args)

Parameters

  • args.i - ordinal number of the current auto refresh call

  • args.preventDefault() - cancels the current auto refresh call

Examples

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);
};

See Also

AutoRefresh [doc.daypilot.org]

DayPilot.Month.autoRefreshInterval

DayPilot.Month Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript