Color Weekends

In the normal scheduler, I used the following code from 02_days_coloring sample, to color the weekend days.

      scheduler.templates.week_date_class=function(date,today){
         if (date.getDay()==0 || date.getDay()==6)
            return "weekday";   
         return "";
      };

Is there anything similar for the mobile scheduler that could be used to color the weekend days? By adding a class to the DIVs of the weekend days and setting the relevant CSS?

Thanks for any assistance or suggestions you can provide.

Its kind of cheating, but if you are using default week starting mode ( start from sunday ) you can color first and last cell like

.dhx_cal_body td:first-child div{ background:#FBB; } .dhx_cal_body td:last-child div{ background:#FBB; }

If there’s not a more elegant way, then I will adopt that - thanks.

Stanislav’s solution is the only possible way to highlight dates in Calendar (at least in this version).
However, you can show a bar with week days in calendars - possibly it could be used instead.

$$(“scheduler”).$$(“formCalendar”).define(“weekHeader”,true);
$$(“scheduler”).$$(“calendar”).define(“weekHeader”,true);

In this bar Saturday and Sunday slots have special css classes: dhx_saturday and .dhx_sunday respectively. So, you can highlight weekend days in the header:

.dhx_saturday, .dhx_sunday{ background-color: #e5e4d2; color: #e57238; }

IS this possible in timeline view too?

Hello,

mobile scheduler does not have timeline view. Possibly you asked about desktop scheduler …