This is a migrated thread and some comments may be shown as answers.

How to change backkground colour of weekend in Scheduler Month View

1 Answer 343 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Abby
Top achievements
Rank 1
Abby asked on 30 Sep 2020, 02:29 PM

Hi, I'm using ASP.Net Core Scheduler and I'm wondering how to change the background colour of Saturday and Sunday to represent the weekend within the Month View. I want the month view to look like what Saturday and Sunday look like in the week view.

Is this possible? 

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 05 Oct 2020, 06:43 AM

Hi Abby,

Non-work hours and days in Week view have class k-nonwork-hour applied, which has specific background-color. We may inspect this color and apply it to the Saturday and Sunday cells for Month view - Dojo snippet:

    <style>
      html body .k-scheduler-monthview .k-scheduler-table tbody tr td:nth-of-type(1),
      html body .k-scheduler-monthview .k-scheduler-table tbody tr td:nth-of-type(7) {
        background-color: #f5f5f5;
      }
    </style>

Note that in my example Sunday is the first cell in month view, while Saturday is the last one. If the week days configuration is different than that, the cell index in the styles above should be updated to the correct ones. If the background-color of the used theme is different, then update the color to the correct one.

Regards,
Dimitar
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Tags
Scheduler
Asked by
Abby
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or