Try Now
More in this section

Forums / Bugs & Issues / Date picker issue in Arabic

Date picker issue in Arabic

3 posts, 0 answered
  1. Hydo L
    Hydo L avatar
    98 posts
    31 Mar 2010
    23 Feb 2012
    Link to this post
    I have a website which is arabic and English. And it has a front end form where it picks up user details including some date. Now the date picker is showing arabic calendar on arabic site (eg. 21/04/1433). It should show english calendar.

    Can any one help?

    Thank you,
  2. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    25 Oct 2016
    28 Feb 2012
    Link to this post

     I suppose you have a date picker control placed on a page that is configured to show arabic time. In Sitefinity is you create a control with RadDatePicker it will not show dates in arabic if it is not configured to load the calendar for this culture (by default is loads gregorian calendar).

    When Arabic is added as a translation to the english pages the current UI culture is changed to "ar" and all controls that support System.Globalization seek to load that culture. If the RadDatePicker is configured to specifically show arabic time I think it will do so in english pages too.
    Review this demo and add additonal logic to the date picker to detect the current ui culture and load different calendar when the culture is "en" or "ar". 
    This gets the current culture.

    var currentCulture = Thread.CurrentThread.CurrentUICulture;

    if this is not the case with the control can you share the control code so I can test with it at my end?
    Stanislav Velikov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Chandresh
    Chandresh avatar
    2 posts
    17 Sep 2012
    02 Aug in reply to Stanislav Velikov
    Link to this post

    I Have a site on which I am working on it right now. it has 2 languages EN and AR. Now the problem is that in arabic Site dates are shown in hijri format but I want to show it as gregorian format. 

    for example Date in en site looks like this : 31 July 2016 but same date in arabic site is Displayed like شوال 26, 1437 I want to display all the dates as en site format that is in english

    if there any setting available Please do let me know



3 posts, 0 answered