DayPilot.Scheduler.onEventFilter

The onEventFilter event handler fires for each event in the JavaScript Scheduler to determine the effect of the filter applied using events.filter().

Declaration

DayPilot.Scheduler.onEventFilter(args)

Parameters

Notes

By default, all events remain visible. Use this event handler to implement custom filter rules by changing args.visible for the current event.

Examples

JavaScript

const dp = new DayPilot.Scheduler("dp", {
  onEventFilter: (args) => {
    if (args.filterParam && args.filterParam.hide) {
      args.visible = false;
    }
  },
  // ...
});
dp.init();

dp.events.filter({ hide: true });

Angular

<daypilot-scheduler [config]="config"></daypilot-scheduler>
config: DayPilot.SchedulerConfig = {
  onEventFilter: (args) => {
    if (args.filterParam && args.filterParam.hide) {
      args.visible = false;
    }
  },
  // ...
};

React

<DayPilotScheduler
  onEventFilter={onEventFilter}
  {/* ... */}
/>
const onEventFilter = (args) => {
  if (args.filterParam && args.filterParam.hide) {
    args.visible = false;
  }
};

Vue

<DayPilotScheduler
  @eventFilter="onEventFilter"
  <!-- ... -->
/>
const onEventFilter = (args) => {
  if (args.filterParam && args.filterParam.hide) {
    args.visible = false;
  }
};

See Also

Event Filtering [doc.daypilot.org]

DayPilot.Scheduler.events.filter

DayPilot.Scheduler Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript