Categories | Question details Back To List | ||
Scheduler - setting event color I'm attempting to configure the look of an event. The top of the event will have the color specified in the xml value I send // set event coloring scheduler.templates.event_class=function(start,end,event){ return event.color; } /*event in day or week view*/ .dhx_cal_event.bg_grey div{ background-color:#CCCCCC !important; color:white !important; } /*multi-day event in month view*/ .dhx_cal_event_line.bg_grey{ background-color:#CCCCCC !important; color:white !important; } while the body (dhx_body) will be white (or any color I define in css). Any suggestions on how I can accomplish this? Thanks, Steve Answer posted by Support on Sep 03, 2009 09:01 The formatting rules doesn't give direct access to the color of event, but allows to define the css class based on the any property of event The normal event bars contains 4 elements, so if you want to color the header and body separately , you can use .dhx_cal_event div.dhx_body, .dhx_cal_event div.dhx_footer{ background-color:white !important; } .dhx_cal_event.bg_grey div.dhx_header, .dhx_cal_event.bg_grey div.dhx_title{ background-color:#CCCCCC !important; color:white !important; } first rule defines default coloring for body part of all events , second defines coloring rule for header As result the coloring will affect only headers of events. Answer posted by Steve on Sep 03, 2009 10:04 Thanks that worked perfectly! |