dynamic MarkedTimespan

hi all,
anyone know how to make MarkedTimespan move dynamicaly based on event start_date end event end_date that stored on sql.
the purpose is just to mark checkpoint on that time in timeline view. so if the event time is adjusted, then the mark will also automatically follow the event.
already play with scheduler.getEventStartDate(id) and scheduler.getEvent(id).start_date but none work.
this is one of sample of code get the date from event id 71, this is doesnt work :
start_date: new Date(scheduler.getEventStartDate(71)),
end_date: new Date(2013,08,21,04,35),
css: “yellow_section” });


There is no way to make such thing fully automatic.
You can attach to onEventChanged handler
docs.dhtmlx.com/scheduler/api__s … event.html
and from it adjust the position of marked timespan ( delete old one, and create the new one in the necessary position )

already try use this sample code, still doesnt work, cant get the value at debugging alert there.
here the code :

	var updateDayStatus = function(event_id, ev) {
		var sday = scheduler.date.date_part(new Date(ev.start_date));
		var eday = scheduler.date.date_part(new Date(ev.end_date));
		var events = scheduler.getEvents(sday, eday);
		alert (sday + " : " + eday + " : " + events); // debugging

		// remove current status
		scheduler.deleteMarkedTimespan({ start_date: sday, end_date: eday });

		if (!events.length)
			return; // no events on that day, nothing to mark

		var options = {
			start_date: sday,
			end_date: eday,
			css: "yellow_section"

		return true;

	scheduler.attachEvent("onEventLoaded", updateDayStatus);
	scheduler.attachEvent("onEventChanged", updateDayStatus);
	scheduler.attachEvent("onEventDeleted", updateDayStatus);

i’ve made mistake the var should be like this :

	var sday = new Date(ev.start_date);
	var eday = new Date(ev.end_date);

and now it is appear on event, but there is still problem on delete mark, cant get the previous value so it will delete incorectly.

Try to use onBeforeEventDelete instead of onEventDeleted, it occurs a bit earlier, and event object will be accessible from it.