ComponentOne DateTimeEditors for WPF and Silverlight
Setting the First Day of the Week
C1DatePicker Control Help > C1DatePicker Task-Based Help > Setting the First Day of the Week

By default, the C1DatePicker control Sunday as the first day of the week in the drop-down calendar, but you can change the starting day if necessary. In this topic, you will learn how to change the first day of the week in the designer, in XAML, and in code.

In the Designer

To change the first day of the week, complete the following steps:

  1. Click the C1DatePicker control once to select it.
  2. In the Properties window, click the C1DatePicker.FirstDayOfWeek drop-down arrow and select a day from the list. For this example, select Monday.

In XAML

To change the first day of the week, place FirstDayOfWeek="Monday" within the <c1:C1DatePicker> tags so that the markup resembles the following:

 

<c1:C1DatePicker FirstDayOfWeek="Monday">

In Code

To change the date format, complete the following steps:

  1. Open the MainWindow.xaml.cs page.
  2. Place the following code beneath the InitializeComponent() method:

    Visual Basic
    Copy Code
    C1DatePicker1.FirstDayOfWeek = DayOfWeek.Monday
    

     

    C#
    Copy Code
    c1DatePicker1.FirstDayOfWeek = DayOfWeek.Monday;
    

     

  3. Run the project.

This Topic Illustrates the Following:

In this topic, you set the FirstDayOfWeek property to Monday so that Monday is the first day of the week in the drop-down calendar. The final result will resemble the following image: