Get all event for the current view

I know that we can list all loaded appointments using the variable

console.log(scheduler._events)

But how can I get all events displayed on the current view? For example, if I open week view I want to get all events for the selected week. If I open day/unit view - all events for the selected date.

Hi,
you can select events by displayed date:

var state = scheduler.getState(); var visibleEvents = scheduler.getEvents(state.min_date, state.max_date);
docs.dhtmlx.com/scheduler/api__s … vents.html
docs.dhtmlx.com/scheduler/api__s … state.html