Filtering Events
For any specified view, you can set a filtering function that will define which events should be displayed in the Scheduler and which shouldn't.
scheduler.filter_week = (id, event) => {
if (event.name === 'New event') {
return false; // event will be filtered (not rendered)
}
return true; // event will be rendered
};
Here, "week" is the name of a view in scheduler.filter_week.
The filter_(viewName) method takes 2 parameters:
id- the event's idevent- the event object
Remember, you can set different filtering functions for different views:
scheduler.filter_day = scheduler.filter_week = (id, event) => {
// some code
};
...
scheduler.filter_timeline = (id, event) => {
// some other code
};
Related samples
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.