i need to prevent server calls that are automatically triggered during the navigate
event of the scheduler, because i need to call a my function LoadData
that does a lot of things and then permfors a server call datasource.read()
programmatically
The scheduler is configired with the weekTimeline view
i've tried in this way
navigate: function(e) {
e.preventDefault(); //<<--this block all
LoadData() //<-- this perform a server call but before try to read the current scheduer view dates (that are not "updated" (are the old ones) because "e.preventDefault()" has blocked the movement from a week to the next
}
This prevents the server call but prevents the date navigation as well (doesn't move on the next week
is it possible to block the server call only and continue to do everithing is normally done with the scheduler during this event?
The navigate
event provides the following event data:
So you could try and use use the date
method to navigate to the date the user was attempting to navigate in the first place:
navigate:function(e){
e.preventDefault();
var scheduler = e.sender;
var navigateToDate = e.date;
LoadData()
//navigate to date
scheduler.date(navigateToDate);
}