ComponentOne DateTimeEditors for UWP
C1DatePicker Help / C1DatePicker Task-Based Help / Setting the First Day of the Week
In This Topic
    Setting the First Day of the Week
    In This Topic

    By default, the C1DatePicker control uses 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 <DateTimeEditors:C1DatePicker>tags so that the markup resembles the following:

    Markup
    Copy Code
    <DateTimeEditors: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 C1DatePicker_Loaded event:
    Visual Basic
    Copy Code
    C1DatePicker1.FirstDayOfWeek= DayOfWeek.Monday
    

    C#
    Copy Code
    c1DatePicker1.FirstDayOfWeek= DayOfWeek.Monday;
    
    1. Run the project.

    This Topic Illustrates the Following:

    In this topic, you set the C1DatePicker.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:

    See Also