There are two approaches that can be used to achieve this requirement.
The first one is to modify the value of the MaterialPalette.Palette.PrimaryNormalColor property. With this approach, each element that uses the value of this property will also be affected.
The second approach would be to modify the styles and control templates of the elements specifically of the header button and the weeks. This way, only these elements will be affected.
With this in mind, extract the default Style of the CalendarButton with x:Name="CalendarButtonStyle" and locate the Trigger for the ButtonType property when its value is WeekNumber. In it, modify the Setter for the ContentPresenter's Foreground property:
<TriggerProperty="ButtonType"Value="WeekNumber"><SetterProperty="mat:MaterialAssist.IsShadowDisabled"Value="True"/><SetterTargetName="Material"Property="IsEnabled"Value="False"/><!--Modify the following Setter's Value--><SetterTargetName="Content"Property="Foreground"Value="{telerik:MaterialResource ResourceKey=AccentNormalBrush}"/><SetterTargetName="BorderVisual"Property="Visibility"Value="Collapsed"/></Trigger>
After that, create a new Style that targets the RadCalendarButton and set the modified Style to the DayButtonStyle property:
To change the header button's color, create a new Style with TargetType="Button" and base it on the Style with x:Name="CalendarHeaderButton". Then, set the Foreground property to the desired value:
After that, extract the default ControlTemplate of the RadCalendar control and locate the Button element with x:Name="Header". On it, set the newly created Style (from the above code snippet) on its Style property. Set the customized ControlTemplate to the Template property of the RadCalendar via a Style. Finally, set the custom RadCalendarStyle to the CalendarStyle property of the RadDateTimePicker control:
This approach will only modify the week numbers and the header button's foreground color as shown in the below image:
With this being said, I have attached a sample project, which contains the second approach's full implementation. Please note that it is built with NoXaml assemblies in mind, as it allows for easier customizations of the default Styles and ControlTemplates.
Regards,
Stenly
Progress Telerik
A brand new ThemeBuilder course was just added to the Virtual Classroom. The training course was designed to help you get started with ThemeBuilder for styling Telerik and Kendo UI components for your applications. You can check it out at https://learn.telerik.com