This is a migrated thread and some comments may be shown as answers.

Localizing RadDatePicker when in Month-selection mode

1 Answer 59 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Frederik
Top achievements
Rank 1
Frederik asked on 17 Dec 2012, 09:46 AM
In my Silverlight-app I am using the RadDatePicker in DateSelectionMode="Month".

What are the localization keys to translate the month abbreviations displayed in the selection box?

Best Regards
Frederik

1 Answer, 1 is accepted

Sort by
0
Ivo
Telerik team
answered on 21 Dec 2012, 08:20 AM
Hi Frederik,

The approach used in RadDatePicker for month and day names localization is the built in one into the DateTime class, rather than localization keys. One way to customize them is to create a new instance of the CultureInfo class and modify the DateTimeFormat.AbbreviatedMonthNames property. Here is sample code:
var culture = (CultureInfo)CultureInfo.CurrentCulture.Clone();
culture.DateTimeFormat.AbbreviatedMonthNames = new string[] {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13" };
this.DatePicker.Culture = culture;

All the best,
Ivo
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
DatePicker
Asked by
Frederik
Top achievements
Rank 1
Answers by
Ivo
Telerik team
Share this question
or