Formatting .event_text and .event_bar_text

Is there any way to dynamically format the scheduler.templates.event_text and the scheduler.templates.event_bar_text through the database feed?

I want to selectively apply the css style for text-decoration: line-through; on certain events. I need to pass that style through the database feed somehow.

Is this possible?

Here is what I have tried – no success (happened upon this in the doc at docs.dhtmlx.com/scheduler/custo … stoanevent):

.dhx_cal_event.off_event div { background-color: #FF0000 !important; text-decoration: line-through !important; /* for events coded as "OFF" */ }

Fixed it…

The documentation is incorrect and in error.

It states to do this “if (event.type == ‘manager’) return “manager_event”;” and do this “”.dhx_cal_event.manager_event div{.

I thought what was happening was that manager_evenet was getting appended to dhx_cal_event but that is not the case

The css either needs to be div.manager_event { or the js return needs to be dhx_cal_event.manager_event.

Documentation needs to be corrected.

Ok to close this post.

Hi,
I don’t think there is a mistake.
a documentation article shows three different css rules for each kind of event - screencast.com/t/m5m6nCPUIU

Since you’ve used only css selector for a single day event in week/day views (i.e. these elements - ) - it’s expected that it hasn’t been applied in other modes.

Please check these three demos (also please note the differences in display in month mode):
use only “.dhx_cal_event.off_event div” selector:
docs.dhtmlx.com/scheduler/snippet/9e0be535

vs
use only “div.off_event” selector
docs.dhtmlx.com/scheduler/snippet/738d428c

vs
use selectors for each kind of events ( “.dhx_cal_event.off_event div”, “.dhx_cal_event_line.off_event”, “.dhx_cal_event_clear.off_event”) , as tutorial suggests:
docs.dhtmlx.com/scheduler/snippet/9c31e95a

  • usually, we suggest using different selectors since event nodes may need different styling due different DOM structure and the desired look - e.g. note different styling of single day event in month view docs.dhtmlx.com/scheduler/snippet/98b443be . Although, depending on what you need, a universal css rule like the one you used may also work.