How to set Monday as the first day of week in the gantt week view?

1 Answer 107 Views
Gantt
Dev
Top achievements
Rank 1
Dev asked on 28 Sep 2022, 09:18 PM

I know that if set ShowWorkDays(true) only workdays will be shown and I can set WorkWeekStart and WorkWeekEnd. 

But what if I want to keep showing the weekends and still have monday as first day of the week?

1 Answer, 1 is accepted

Sort by
0
Momchil
Telerik team
answered on 03 Oct 2022, 03:30 PM

Hi Renke,

Thank you for reaching out.

The Gantt's first day of the week is based on the current kendo culture.

To set the first day of the week to Monday, change the first day of the calendar to "1" before the Gantt is initialized.

<script>
    kendo.culture().calendar.firstDay = 1;
</script>

To make sure the script runs before the initialization of the Gantt, place it before the HtmlHelper of the Gantt, as scripts are evaluated from top to bottom.

Here is a Telerik REPL demo that implements the above.

Let me know if any questions arise.

 

Regards,
Momchil
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Gantt
Asked by
Dev
Top achievements
Rank 1
Answers by
Momchil
Telerik team
Share this question
or