All docs
V24.1
24.2
24.1
23.2
23.1
22.2
The page you are viewing does not exist in version 22.2.
22.1
The page you are viewing does not exist in version 22.1.
21.2
The page you are viewing does not exist in version 21.2.
21.1
The page you are viewing does not exist in version 21.1.
20.2
The page you are viewing does not exist in version 20.2.
20.1
The page you are viewing does not exist in version 20.1.
19.2
The page you are viewing does not exist in version 19.2.
19.1
The page you are viewing does not exist in version 19.1.
18.2
The page you are viewing does not exist in version 18.2.
18.1
The page you are viewing does not exist in version 18.1.
17.2
The page you are viewing does not exist in version 17.2.

JavaScript/jQuery Scheduler - Optimize Scheduler Performance with Lazy Loading

If the performance of a Scheduler component suffers due to a high number of appointments, you can lazy load the data as necessary.

  1. Modify your back-end API to accept queries with time limit parameters. For example, the query appointments?startDate=01-01-2024&endDate=01-07-2024 should only return events within the specified time window.

  2. Create a customStore that can pass extra arguments to your back-end code.

    const myCustomStore = new CustomStore({
        key: 'id',
        async load(loadOptions) => {
            const startDate = loadOptions.startDate;
            const endDate = loadOptions.endDate;
            try {
                const response = await fetch(`https://my-server.com/api/appointments?startDate={startDate}&endDate={endDate}`);
                const result = await response.json();
                    return {
                        data: result.data;
                    }
            } catch (err) {
                throw new Error('Data Loading Error');
            }
        }
    });
  3. To indicate that your back-end server is now responsible for filtering, set the remoteFiltering Scheduler option to true.

    jQuery
    index.js
    $("#schedulerContainer").dxScheduler({
        dataSource: myCustomStore,
        remoteFiltering: true
        ...
    });
    Angular
    app.component.html
    <dx-scheduler
        [dataSource]="myCustomStore"
        [remoteFiltering]="true"
        ...>
    </dx-scheduler>
    Vue
    App.vue
    <DxScheduler
        :data-source="myCustomStore"
        :remote-filtering="true"
        ...
    />
    React
    App.js
    <Scheduler
        dataSource={myCustomStore}
        remoteFiltering={true}
        ...
    />