load
Description
Loads data to the scheduler from an external data source
load: (url: string, callback?: SchedulerCallback) => void
Parameters
url- (required) string - the server-side URL (may be a static file or a server-side script which outputs data in one of the supported formats)callback- (optional) function - the callback function
Example
scheduler.load("data"); // the format of loaded data is auto-detected
// or
scheduler.load("data", () => {
alert("Data has been successfully loaded");
});
Related samples
Details
Pay attention that in case of dynamic loading, the callback function that is passed as a second parameter will be called only during the initial loading of data. While the next portions of data will be loaded later, the callback function won't be called anymore.
If you need to call the callback function each time data is loaded into Scheduler, you can use the onLoadEnd event.
Migration
In v5.2 and later, Scheduler detects the data format automatically.
But before v5.2, the method included three parameters:
url- (string) the server-side URL (may be a static file or a server-side script that outputs data as XML)type- (string) ('json', 'xml', 'ical') the data type. The default value is 'xml'callback- (function) the callback function
Related API
Related Guides
Change log
- The second
typeparameter of the method was removed in v5.2.
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.