Date picker issue in Arabic

Posted by Community Admin on 04-Aug-2018 13:24

Date picker issue in Arabic

All Replies

Posted by Community Admin on 23-Feb-2012 00:00

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,
hydo.

Posted by Community Admin on 28-Feb-2012 00:00

Hi,

 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?
Greetings,
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

Posted by Community Admin on 02-Aug-2016 00:00

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

 

 

This thread is closed