Colorizing the markers depending on the event


I have the following code in my file:

			{view:"richselect",   id:'subject', label:"Soort", name:"subject", yCount:"6", options:[

What I would like to accomplish is that, depending on the option the user selects, the marker in the daylist and month view changes it’s color that is predefined for that subject. I have gone through the whole forum and tried to modify examples that were given but I am stuck.

Suppose that a user selects the first option (“afspraak”) and I want the marker to show up red, how do I do that? An example would be greatly appreciated.

Thank you,


you can use event_marker template. For example:

scheduler.templates.event_marker = function(obj,type){ var colors = {"afspraak": "red", "training": "blue", "netwerken": "green"}; var c = (colors[obj.subject]||"#E6F8FF"); return "<div class='dhx_event_marker' style='background-color:"+ c +"'></div>"; };


It works like a charm. Thank you!


I was happy to help )