DayPilot.Scheduler.onAutoRefresh

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

Applies to DayPilot Pro for ASP.NET WebForms, MVC, and Java.

Declaration

DayPilot.Scheduler.onAutoRefresh(args)

Parameters

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

Examples

JavaScript

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

Angular

<daypilot-scheduler [config]="config"></daypilot-scheduler>
config: DayPilot.SchedulerConfig = {
  onAutoRefresh: (args) => {
    if (dirty) {
      args.preventDefault();
    }
  },
  // ...
};

React

<DayPilotScheduler
  onAutoRefresh={(args) => {
    if (dirty) {
      args.preventDefault();
    }
  }}
  {/* ... */}
/>

Vue

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

See Also

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript