DayPilot.Calendar.onAutoRefresh

The onAutoRefresh event handler fires before an automatic refresh is requested from the server side.

Declaration

DayPilot.Calendar.onAutoRefresh(args)

Parameters

  • args.i (number) - ordinal number of this auto-refresh call
  • args.preventDefault() - cancels this auto-refresh call

Notes

If auto refresh is enabled, this event is fired at intervals specified by DayPilot.Calendar.autoRefreshInterval.

In ASP.NET WebForms, ASP.NET MVC, and Java editions, it fires before the server-side event.

Examples

JavaScript

const calendar = new DayPilot.Calendar("dp", {
  onAutoRefresh: args => {
    args.preventDefault();
  },
  // ...
});
calendar.init();

Angular

<daypilot-calendar [config]="config"></daypilot-calendar>
config: DayPilot.CalendarConfig = {
  onAutoRefresh: args => {
    args.preventDefault();
  },
  // ...
};

React

<DayPilotCalendar
  onAutoRefresh={onAutoRefresh}
  {/* ... */}
/>
const onAutoRefresh = (args) => {
  args.preventDefault();
};

Vue

<DayPilotCalendar
  @autoRefresh="onAutoRefresh"
  <!-- ... -->
/>
const onAutoRefresh = (args) => {
  args.preventDefault();
};

See Also

Auto Refresh [doc.daypilot.org]

DayPilot.Calendar.autoRefreshInterval

DayPilot.Calendar Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript