Setting startdate clientside without loading new data


We’re evaluating the MVC Scheduler for our project.

We are loading data in response to an external event using scheduler.load(), but we also need need to set the scheduler start date. If we use the scheduler.setViewCurrentView(), it reloads the data from the server.

What we need to happen is that in response to en external event we can:

  • Set the start date for the scheduler
  • load data using a custom query built from data in the external event

something like this:
var reload = function (selectedValues) {
if (selectedValues.length > 0) {
var weeksArray = selectedValues.split("-");
var weekParts = weeksArray[0].split("#");
var startDate = w2date(weekParts[0], weekParts[1], 0);
scheduler.load("@Model.DataUrl" + “weeksString=” + selectedValues);

The problem with this is that the setCurrentView() reloads the (wrong) data. Is there a way to suppress this such that it renders the scheduler with load()'ed data, and with the startDate from setCurrentView()?

Thor Arne Johansen
Oppad AS

scheduler.setCurrentView doesn’t trigger data loading. Please check your code for “onBeforeViewChange” or “onViewChange” event handlers, data should be reloaded from there.
Anyway, you can use
scheduler.updateView(date, view), which does the same thing as setCurrentView but doesn’t trigger events