Scheduler header navigation style

6 Answers 38 Views
Scheduler
n
Top achievements
Rank 1
Iron
Iron
n asked on 08 Nov 2024, 08:31 PM

Hi,

how can I change the style of the navigation header? the days an all that month dropdown, I don't see any documentation for this.

 

6 Answers, 1 is accepted

Sort by
0
Accepted
n
Top achievements
Rank 1
Iron
Iron
answered on 13 Nov 2024, 11:34 PM
thank you for your answers, the last one seems like I made it work, but I'm only missing one thing, is there a way to change the first day of the week in that dropdown? already try with the setter but does not work
Yana
Telerik team
commented on 14 Nov 2024, 09:02 PM

First day of the week can be set in the same way as the date formats through the Culture.DateTimeFormat, here is an example:

appCulture.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Wednesday;

0
Yana
Telerik team
answered on 11 Nov 2024, 10:13 AM

Hello,

Thank you for sending the image, it's of great help. 

The Scheduler navigation header can be customized through the Scheduler ControlTemplate, the approach is described here: Customizing Header Settings in RadScheduler for .NET MAUI.

As to the dropdown for navigating to a different date - this is actually a Calendar control used internally inside the Scheduler.

You can style the Calendar days in Month View through the DayStyleSelector property - in the style selector you can define separate styles for selected and Today days, please check the detailed example here: 

Calendar: Applying Style Selector

You can easily apply the created custom Style Selector to the Calendar inside Scheduler with implicit style like this:

<Style TargetType="telerik:RadCalendar">
    <Setter Property="DayStyleSelector" Value="{StaticResource DayStyleSelector}" />
</Style>

Please give this a try and let me know if you have any additional questions on it.

Regards,
Yana
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.

0
n
Top achievements
Rank 1
Iron
Iron
answered on 11 Nov 2024, 04:01 PM

Hi!

Thank you for your answer.

I was talking about the dropdown for navigating to a different date, so it can not be customized? only removed?

Yana
Telerik team
commented on 12 Nov 2024, 03:05 PM

Hi,

The dropdown for selecting a date contains a RadCalendar control. You can customize it through implicit style, for example like this:

<telerik:RadScheduler AutomationId="scheduler" CurrentDate="10/18/2023">
    <telerik:RadScheduler.Resources>
        <Style TargetType="Label" x:Key="DayNameLabelStyle">
            <Setter Property="TextColor" Value="#8660C5" />
            <Setter Property="FontSize" Value="16" />
        </Style>
        <Style TargetType="telerik:RadCalendar">
            <Setter Property="DayNameLabelStyle" Value="{StaticResource DayNameLabelStyle}" />
        </Style>
    </telerik:RadScheduler.Resources>
    <telerik:RadScheduler.ViewDefinitions>
        <telerik:WeekViewDefinition />
        <telerik:WeekViewDefinition IsWeekendVisible="False" Title="Work Week" />
        <telerik:MultidayViewDefinition VisibleDays="3" Title="3 Day" />
        <telerik:DayViewDefinition />
        <telerik:MonthViewDefinition />
    </telerik:RadScheduler.ViewDefinitions>
</telerik:RadScheduler>

The example above shows how you can modify the DayNameLabelStyle property of the Calendar.  In a similar way you can set other styling properties of the Calendar such as the days (through the DayStyleSelector) and other. For more details on the Calendar styling, go to Calendar Styling section.

0
n
Top achievements
Rank 1
Iron
Iron
answered on 13 Nov 2024, 04:50 PM

oh thank you, did not see that :)

another question, how can I change the format of the day label in there?

Yana
Telerik team
commented on 13 Nov 2024, 10:49 PM

The format of the day names comes from the target device culture settings.  You can explicitly modify it through the Culture property of the Scheduler and more specifically, set its DateTimeFormat.ShortestDayNames property. Here is a quick example:

  var appCulture = Thread.CurrentThread.CurrentUICulture;
  appCulture.DateTimeFormat.ShortestDayNames = new String[] { "Su", "M", "Tu", "W", "Th", "F", "Sat" };

 this.scheduler.Culture = appCulture;

0
n
Top achievements
Rank 1
Iron
Iron
answered on 13 Nov 2024, 10:04 PM
also is there a way to add tasks to that calendar and show a dot in those days? I'm doing that but the template does not updates for the days that have tasks, only when I click on the day it updates, can you help me with that please?
Yana
Telerik team
commented on 13 Nov 2024, 10:51 PM

Currently there isn't such built-in functionality, as the Calendar control does not provide appointments support. Please open a support ticket and send us the custom implementation you have so far, so we can take a look and try to help with the approach.
0
n
Top achievements
Rank 1
Iron
Iron
answered on 15 Nov 2024, 06:08 PM
Thank you!
Tags
Scheduler
Asked by
n
Top achievements
Rank 1
Iron
Iron
Answers by
n
Top achievements
Rank 1
Iron
Iron
Yana
Telerik team
Share this question
or