C1DatePicker Control Help > C1DatePicker Task-Based Help > Selecting the Date Format |
By default, the C1DatePicker control displays the date in a short format, but it can also display the date in a long or custom format. In this topic, you will learn how to change the date format in the designer, in XAML, and in code.
In the Designer
To change the date format, complete the following steps:
In XAML
To change the date format, place SelectedDateFormat="Long" within the <c1:C1DatePicker> tags so that the markup resembles the following:
<c1:C1DatePicker SelectedDateFormat="Long">
In Code
To change the date format, complete the following steps:
Visual Basic |
Copy Code
|
---|---|
C1DatePicker1.SelectedDateFormat = C1.WPF.DateTimeEditors.C1DatePickerFormat.Long |
C# |
Copy Code
|
---|---|
c1DateTimePicker1.SelectedDateFormat = C1.WPF.DateTimeEditors.C1DatePickerFormat.Long; |
This Topic Illustrates the Following:
In this topic, you set the SelectedDateFormat to Long, which will display the date in a long format. The final result will resemble the following image: