How to get markTimespan dynamically?


Is any exact way to get block Date and Times (markTimespan) dynamically loading calendar ?

now all of the example, get markTimespan one time only. I want to get markTimespan on dynamically loading the view. I have lot of block times in my DB and can i get and show these block times like getting event using ‘scheduler.load’

Thank you.

current version of the scheduler contains no built-in method to do so. However, the api methods for marked timespan takes simple JS objects as arguments … espan.html
You can manually load timespans data from server on onViewChange event, and when the timespans are loaded, you’ll be able to add them to the calendar … event.html
If you use a jQuery, the code might look following:

[code]scheduler.attachEvent(“onViewChange”, function (mode, date) {
var toStr ="%d-%m-%Y");
var start =[mode + “_start”](new Date(date));
var end =, 1, mode);
dataType: “json”,
url: “url”,
data: {
from: toStr(start),
to: toStr(end)//stringify dates
complete: function (response) {
var timespans = JSON.parse(response.responseText); //preprocess loaded data if neaded

		// Remove previously loaded timespans
		scheduler.deleteMarkedTimespan({ type: "ajax_timespan" });

		for (var i = 0; i < timespans.length; i++) {
			var span = timespans[i];
			span.start_date = scheduler.templates.xml_date(span.start_date);
			span.end_date = scheduler.templates.xml_date(span.end_date);

			span.type = "ajax_timespan"; //add custom type, so all loaded timespans could be deleted

			span.css = "schedule_worktime";
			span.html = "Working";