Is there a way to define a specific class for a specific type of event, for example in my application I have available which I want to show up green, and unavailable which I want to show up red.
In the normal scheduler, this is possible, but I was analyzing the html generated in the mobile version and it doesn’t seem possible to determine colors.
I noticed each day with events has another
with class=“day_with_events”
Now I could easily do something like .day_with_events{ width: 90%; } to make it look nicer, but depending on the type of event, the color should be different.
How do I do this?
From what I’ve gathered through my research, is that different colorized days are not really possible. To me, this is ridiculous since it is supported in the non-mobile version quite well.
Are you really going to charge me to implement different days having different colors?
From what I have heard, A work around would be using setHolidays(), if I go this method, how would I access the inner dhtmlxcalendar so I could use it?
the markers in calendar of the Month view highlight days that have at least one event, but there could be 2 or more events on a certain day. These events may have different types, and it is possible to set only one color for a day in calendar. Therefore, I don’t think that the current styling in month view is “ridiculous”. It is possible to set color for the event marker:
Alexandra, scheduler.templates.event_class = function(obj){
return obj.type==“a”?“event_a”:“event_b”
}
is what I have, but it does not apply to the color of the calendar squares.
I need to have some red squares, some green squares and some red fading green squares
Green means available, red means unavailable, fading red-green means certain times are available while others unavailable.
How much would it cost to get this behavior/feature?
In other words, add classes for each event.
.dhx_cal_day_num .day_with_events{
border-color: transparent green red transparent;
}
.dhx_cal_day_num .day_with_events.available{
border-color: transparent green green transparent;
}
.dhx_cal_day_num .day_with_events.unavailable{
border-color: transparent red red transparent;
}
This approach is rather slow as each getEvents iterate over all events in scheduler. Check of it match. if it doesn’t you may contact us at sales at dhtmlx.com regarding the cost of the customization.