formatting DatePicker date format without changing it's Culture

2 posts, 0 answers
  1. Richard Orechovsky
    Richard Orechovsky avatar
    2 posts
    Member since:
    Oct 2006

    Posted 05 Mar 2013 Link to this post

    My application has to use a specific format of dates, i.e. "10Nov13". This format has to be used in all cultures and should work as a unified format for all languages.
    With DatePicker, I did set the Format to "ddMMMyy", which works pretty well for en-US, but for cs-CZ I get "101013".
    If I set DatePicker's Culture to "en-US", I'm able to achieve the correct format, but the display language is always english, which is not good with a multilingual app.
    Is there a way to format dates without specifying the Culture for entire widget? Something like .Format("ddMMMyy", "en-US")?
  2. Daniel
    Daniel avatar
    2219 posts

    Posted 07 Mar 2013 Link to this post


    The culture scripts are generated based on the .NET cultures in which the abbreviated month names are numbers:

    var culture = new System.Globalization.CultureInfo("cs-CZ");
    string[] names = culture.DateTimeFormat.AbbreviatedMonthNames;
    You could override to use the names instead of numbers you could override the "namesAbbr" array in the kendo.culture.cs-CZ.min.js file. Regards,
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top