The onEventFilter event handler fires for each event in the JavaScript Scheduler to determine the effect of the filter applied using events.filter().
DayPilot.Scheduler.onEventFilter(args)args.e - current event (DayPilot.Event)
args.filterParam (object) - custom filter object supplied by DayPilot.Scheduler.events.filter()
args.visible (boolean) - determines whether the event should remain visible; the default value is true
By default, all events remain visible. Use this event handler to implement custom filter rules by changing args.visible for the current event.
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;
}
};Event Filtering [doc.daypilot.org]