function GetEventCSSClass(start, end, event)
{
if (start < (new Date())) //if date is in past
return “past_reservation”; //then set special css class for it
else {
var mid = parseInt(jQuery.url.param(“mid”));
if (parseInt(event.member_id) == mid)
return “my_reservation”;
else
return “other_reservation”;
}
}
Css classes are in my aspx page’s header and external css file (both already).
Still it doesn’t work. All events are displayed in yellow background as always.
If I run Chrome’s debugger and set a BP on GetEventCSSClass() - it stops there.
So what do I do wrong ?
Please make sure that classes are applied to the events (you can check event boxes with browser Inspector)
Which skin do you use?
Please show CSS definitions of your classes, so we could check them
note that most of scheduler skins attaches color not to ‘dhx_cal_event’ element, but to it’s nested elements. So probably you’ll need to define your classes in following way:
I renamed my classes from
.my_reservation {…}
to
.dhx_cal_event.my_reservation div
{
background-color: yellow;
}
.dhx_cal_event.other_reservation div
{
background-color: lightblue;
}
…
Now it started to color events differently.
Thank you again
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan