Changing event color in Timeline view

Hi,

I created my styles :

.dhx_cal_event.past_event div{ background:grey !important; color:white !important; } .dhx_cal_event.event_Rouge div{ background: #bf0000 !important; color: #ffffff !important; } .dhx_cal_event.event_Bleu div{ background: #007fff !important; color: #000000 !important; } .dhx_cal_event.event_Vert div{ background: #3fbf3f !important; color: #ffffff !important; } .dhx_cal_event.event_Jaune div{ background: #ffbf3f !important; color: #ffffff !important; } .dhx_cal_event.event_Noir div{ background: #000000 !important; color: #ffffff !important; } .dhx_cal_event.event_Blanc div{ background: #ffffff !important; color: #000000 !important; }

After i’ve added this code on my scheduler config :

[code]scheduler.templates.event_class=function(start, end, event){
if (start < (new Date()))
return “past_event”;
if(event.categorie)
return “event_”+event.categorie;

        return "";
    };[/code]

It work fine in week, day or month view but not in timeline view.
How can i make it work ?

and in the scheduler config, i have added this :

Hello,

Please note that you can applied CSS styles and layout/classes in browser Developer Tools.

For timeline and month view you should specify classes following way:

.dhx_cal_event_line.my_class { background-color: red; }
Kind regards,
Ilya

I’ve changed my css style from :

.dhx_cal_event.past_event div{ background:grey !important; color:white !important; } .dhx_cal_event.event_Rouge div{ background: #bf0000 !important; color: #ffffff !important; } .dhx_cal_event.event_Bleu div{ background: #007fff !important; color: #000000 !important; } .dhx_cal_event.event_Vert div{ background: #3fbf3f !important; color: #ffffff !important; } .dhx_cal_event.event_Jaune div{ background: #ffbf3f !important; color: #ffffff !important; } .dhx_cal_event.event_Noir div{ background: #000000 !important; color: #ffffff !important; } .dhx_cal_event.event_Blanc div{ background: #ffffff !important; color: #000000 !important; }

To :

.dhx_cal_event_line.past_event div{ background-color:grey !important; color:white !important; } .dhx_cal_event_line.event_Rouge div{ background-color: #bf0000 !important; color: #ffffff !important; } .dhx_cal_event_line.event_Bleu div{ background-color: #007fff !important; color: #000000 !important; } .dhx_cal_event_line.event_Vert div{ background-color: #3fbf3f !important; color: #ffffff !important; } .dhx_cal_event_line.event_Jaune div{ background-color: #ffbf3f !important; color: #ffffff !important; } .dhx_cal_event_line.event_Noir div{ background-color: #000000 !important; color: #ffffff !important; } .dhx_cal_event_line.event_Blanc div{ background-color: #ffffff !important; color: #000000 !important; }

But it doesn’t change anything.
My events don’t get the color i want.

Another idea ?

For information, i’m using the dhx_terrace skin

    .dhx_cal_event.event_Jaune div{

there should not be “div” at the end.

Best regards,
Ilya

It work.
Thanks a lot.
i’ve looked at my code many time and i didn’t see this big mistake :blush: