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

Arabic language Issue in RadCalendar in Telerik 2009.2.701.35

1 Answer 105 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Sambath
Top achievements
Rank 1
Sambath asked on 03 Jul 2013, 10:26 AM
Hi Team,

I am using the Rad Calendar control, to display in the arabic format calendar, if I set the culture property to "ar-SA". But It throws the exception.

Valid values are between 1318 and 1500, inclusive.
Parameter name: year

Sample Code
<telerik:RadCalendar ID="radCalendar" runat="server" CultureInfo="ar-SA">               
            </telerik:RadCalendar>

I want display the Hijiri calendar if the culture property is "ar-SA", not only calendar and date picker as well.
So here I just want to confirm that whether this issue has been resolved in new releases or not.
If the same exists, I need a work around to resolve the issue.

Any help would be appreciated.
Thanks,

1 Answer, 1 is accepted

Sort by
0
Accepted
Konstantin Dikov
Telerik team
answered on 05 Jul 2013, 12:00 PM
Hi Sambath,

Thank you for contacting us.

Both RadCalendar and RadDatePicker support only cultures based on the Gregorian calendar. Unfortunately, due to the complexity of the controls there is no workaround that could allow you to display Hijri calendar.

The only available workaround is for the exception you get when you set CultureInfo=”ar-SA”, but you will still get the Gregorian calendar to display. Here is the code:

protected void Page_Load(object sender, EventArgs e)
{
    var culture = new System.Globalization.CultureInfo("ar-SA");
    culture.DateTimeFormat.Calendar = new GregorianCalendar();
    this.radCalendar.CultureInfo = culture;
}

 
Regards,
Konstantin Dikov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Calendar
Asked by
Sambath
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or