It works from server side:
sched.TimeSpans.Add(new DHXMarkTime() {
Day = DayOfWeek.Monday,
CssClass = “event-HoraComer”, HTML = “”,
Zones = new List() { new Zone { Start = 14 * 60, End = 16 * 60 } }, SpanType = DHXMarkTime.Type.Default
});
Did you define css class for the marked timespan?
I’ve just checked on the local example - timespan is added and rendered. Without any css settings it is transparent, since the default type do not have predefined style(but you still can find it with a DOM inspector). If you add css setting for bg color or border - timespan will be shown
css is “event-HoraComer” and is set in cssCass property, CssClass = “event-HoraComer”
I understand than “default” is a type, not a css class. Anyway I’ve created class .default but it doesn’t work, I do not see any div with .default class rendered.
I think I am confuse with it, if I set type “dhx_time_block”, it renders the time block, but lock it, and I want to render a time block with an spcific css (“event-HoraComer”) but no to lock the time, so I readed in documentation I’ve to set property type to “default”, but it do nothing. Also I do not understand relation between properties cssclass and type. type property it’s not documented.
Hello,
In the code from your first post, css class of client-side timespan is defined as “event - HoraComer” (whitespaces around the dash). Maybe you’ve specified wrong class in configuration.
scheduler.addMarkedTimespan({
days: 1
, zones: [14 * 60, 16 * 60]
, css: “event-HoraComer”
, type: “default”
});
scheduler.setCurrentView();[/code]
And timespan was displayed properly. If you have different result - please attach a demo.
Thats correct, ‘type’ is added to have a possibility to create logically different types of timespans (you can check if particular event overlaps timespan of the particular type docs.dhtmlx.com/scheduler/api__s … espan.html )
There is only type with predefined behavior - “dhx_time_block” - also has predefined css style, thats why it’s visible even if you do not specify custom styles. So if timespan is visible when have ‘dhx_time_block’ type and not visible with other types - that means custom css rules are not attached