New to Telerik UI for WPF? Download free 30-day trial

How to Set the First Day of the Week

The purpose of this tutorial is to show you how to modify the default order of the days in the calendar view of your RadDateTimePicker control. There are two ways to do this, respectively:

Through the CultureInfo.DateTimeFormat property

Let's assume you've defined RadDateTimePicker as shown in Example 1.

Example 1: RadDateTimePicker definition

<telerik:RadDateTimePicker x:Name="radDateTimePicker"/> 

You can then set the FirstDayOfWeek property of the current culture's DateTimeFormat as demonstrated in Example 2.

Example 2: Setting FirstDayOfWeek

CultureInfo cultureInfo = new CultureInfo("en-US"); 
cultureInfo.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Friday; 
this.radDateTimePicker.Culture = cultureInfo; 
Dim cultureInfo As New CultureInfo("en-US") 
cultureInfo.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Friday 
Me.radDateTimePicker.Culture = cultureInfo 

Through the CalendarStyle property

Another way to achieve the same result is to define a style targeting the RadCalendar control and add a setter for the FirstDayOfWeek property. Example 3 demonstrates such a style.

Example 3: Defining a custom RadCalendar style

<Style x:Key="CalendarStyle" TargetType="telerik:RadCalendar"> 
    <Setter Property="FirstDayOfWeek" Value="Friday" /> 
</Style> 

If you're using implicit styles, you should base your style on the RadCalendarStyle.

You can then use this style implicitly or set it for a single RadDateTimePicker instance through the control's CalendarStyle property as shown in Example 4 and Example 5.

Example 4: Defining an implicit style

<Style TargetType="telerik:RadDateTimePicker"> 
    <Setter Property="CalendarStyle" Value="{StaticResource CalendarStyle}" /> 
</Style> 

If you're using implicit styles, you should base your style on the RadDateTimePickerStyle.

Example 5: Setting an individual calendar's CalendarStyle property

<telerik:RadDateTimePicker CalendarStyle="{StaticResource CalendarStyle}" /> 

Figure 1 shows the final result.

Figure 1: RadDateTimePicker with week starting from Friday

RadDateTimePicker with week starting from Friday

See Also

In this article