setLoadMode

sets the mode that allows loading data by parts (enables the dynamic loading)

void setLoadMode(string mode);
modestringthe loading mode

Example

scheduler.config.load_date = "%Y.%m.%d";
scheduler.init('scheduler_here',new Date(2009,10,1),"month");
 
scheduler.setLoadMode("month")
scheduler.load("data/events.php");

Related samples

Details

The method should be called after the scheduler.init() call, but before loading data into the scheduler.

By default, scheduler loads all data at once. But it may become problematic, when you are using big event collections. In such situations, you should load data by parts, necessary to fill the viewable area of the scheduler.

The mode parameter can take only one of the predefined set of values. The predefined values are:

  • day;
  • week;
  • month;
  • year.

For example, if you set the 'month' mode, the scheduler will request data just for the current month and load the remaining ones on demand. Read more about the loading modes.

Request

Generated requests look like this:

Data?from=DATEHERE&to=DATEHERE

where DATEHERE - a valid date value in the format defined by the load_date option.


If you are using dhtmlxConnector on the server side, you don't need to do any additional server-side operations to parse data.

See also
Back to top