Change color of past time slot

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

you can use client-side markTime api, here is the docs: … 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(){
	markTime = scheduler.markTimespan({
		start_date: scheduler.getState().min_date,
		end_date:   new Date(),
		css: "cssClassName"


Is it also applicable to monthly and weekly view?