colors and events with different sections

Hy! I have events with different sections. Could you guys give me some example code how can do, that each section have own color.

Do you mean “unit view” mode ?

Yes

Hey There!

You can use this?

[code]scheduler.templates.event_class=function(start,end,event){

if(event.section == "SECTION 1 NAME") {
	return "section1";
} else if(event.section == "SECTION 2 NAME")
	return "section2";
else
	return "";

}[/code]

You have to declare the css somehow like this:

.dhx_cal_event.section1 div{ background-color:#f5836d !important; color:#000000 !important; }
Could i help you out?

Best wishes,
2Fast

doesn’t work. when I try

scheduler.templates.event_text=function(start,end,event){
			return event.section+"  Text:<b> "+event.text+"</b><br>;
		}

then the text in event displays as undefined and some other my text.
It sems that event.section doesn’t work.

Of course you have to fit this peace of code to your needs !?
section is just a placehodler fo ryour database or xml field what you are going to differ into sections (units)… event.section is not defined within the basic installation of the scheduler!

Sorry, I don’t understand. Could you explain me a little bit detailed. Thanks

Please.

Check the attached sample
1269420153.zip (43.1 KB)

I copied this code into my and works. The last and only problem is that it doesn’t save events at leaving the site. I tried your sample and it’s the same.

Check
docs.dhtmlx.com/doku.php?id=dhtm … ntegration