Telerik UI for Windows Phone by Progress

When using RadDatePicker you can format the following:

Display Value

RadDatePicker allows you to format the data displayed in it. To do that you have to specify a format string appropriate for the date value and set it to the DisplayValueFormat property of the RadDatePicker control. 

Tip
Defining format strings in XAML can be done in the following way - "{}:{0:your format string}" or "your format string".
CopyXAML
<telerikInput:RadDatePicker x:Name="radDatePicker" DisplayValueFormat="{}{0:dd MMMM, yyyy}" />
CopyC#
this.radDatePicker.DisplayValueFormat = "{0:dd MMMM, yyyy}";

This is equivalent to the following:

CopyXAML
<telerikInput:RadDatePicker x:Name="radDatePicker" DisplayValueFormat="dd MMMM, yyyy" />
CopyC#
this.radDatePicker.DisplayValueFormat = "dd MMMM, yyyy";
Tip
To learn more about formatting visit the Formatting Overview chapter in MSDN.

Here is a snapshot of the result.

Date Picker-Features-Formatting-01

Selector

The format string for the Selector is applied to the Date Selector UI inside the Date Selector Window. The formatting allows you to either change the order, in which the days, the months and the years appear or hide some of them. For example, if you want to display the days first and after them the months and the years you can use "d/m/y" as format string. Here is an example.

Note

It doesn't matter how the days, the months and the years are represented in the format string. It is used only to determine their order and visibility.

Recognized characters are:

  • m or M – defines the presence and order of the Month Wheel.
  • d or D – defines the presence and order of the Day Wheel.
  • y or Y – defines the presence and order of the Year Wheel.
CopyXAML
<telerikInput:RadDatePicker x:Name="radDatePicker" SelectorFormat="d/m/y" />

Or you can just use:

CopyXAML
SelectorFormat="dmy"

If you don't want to display any of the date elements you can simply remove the desired part of the date from the format string. You can simply use the d, m and y letters in any order and combination to adjust the selector format.

Here is an example in which the year doesn't get shown.

CopyXAML
<telerikInput:RadDatePicker x:Name="radDatePicker" SelectorFormat="d/m" />

And the selector format is equivalent to the following:

CopyXAML
SelectorFormat="d/m"  

Here is a snapshot of the example.

Date Picker-Features-Formatting-02