Change color of past time slot

Does anyone here knows how to change the color of the scheduler time slot if already past?

Hi,
you can use client-side markTime api, here is the docs:
192.168.1.251/dhtmlx/docs/doku.p … tain_dates
Code might be the following:[code](function(){
markPast();//change color of the past timeslots
scheduler.attachEvent(“onViewChange”, function(){
markPast();//update color each time user changes the view
});

var markTime = null;
function markPast(){
	if(markTime){
		scheduler.deleteMarkedTimespan(markTime);
	}
	markTime = scheduler.markTimespan({
		start_date: scheduler.getState().min_date,
		end_date:   new Date(),
		css: "cssClassName"
	});
}

})();[/code]

Is it also applicable to monthly and weekly view?