Localizing RadDatePicker when in Month-selection mode

2 posts, 0 answers
  1. Frederik
    Frederik avatar
    4 posts
    Member since:
    May 2011

    Posted 17 Dec 2012 Link to this post

    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
  2. Ivo
    Ivo avatar
    390 posts

    Posted 21 Dec 2012 Link to this post

    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,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top