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

Persian Culture Bug in Rad DatePicker

2 Answers 96 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
amdagha
Top achievements
Rank 1
amdagha asked on 09 Sep 2020, 09:48 AM

Hello Guys,

I'm using Telerik in my winForm Application. I have a RadDatePicker in Form1 and I'm Using Below Code To Chang RadDatePicker Calendar and Format To Persian. 

When I Started the Application in windows 10, every thing was normal and worked correctly but the problem shown when I Started Application in windows 7.

---------------------------------------------------------------------------------------

radDatePicker.Culture = new System.Globalization.CultureInfo("fa-IR");
radDatePicker.Format = DateTimePickerFormat.Custom;
radDatePicker.CustomFormat = "yyyy/MM/dd";
radDatePicker.Value = DateTime.Now;

 

---------------------------------------------------------------------------------------

I Can't figure out why this problem happens. 

I'll be glade if you can help me.

thx.

2 Answers, 1 is accepted

Sort by
0
Nadya
Telerik team
answered on 14 Sep 2020, 08:40 AM

Hello,

Although .NET provides both PersianCalendar and Persian CultureInfo, it seems that there are some issues in Persian culture that prevent the smooth use of Persian culture. I made some research and found resources where similar issues were discussed. Please refer to the following threads that give more information about the problem:
https://archive.codeplex.com/?p=persianculture
https://www.codeproject.com/Articles/250740/Fixing-Optional-Calendars-for-Persian-Culture-in-N

Since this is more like a general programming question feel free to use the suggested solutions there. Feel free to search in the relevant forums if you have any further questions on this topic.

I hope this information is useful. Let me know if you have other questions regarding RadControls from the Telerik UI for WinForms suite.

Regards,
Nadya
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

0
amdagha
Top achievements
Rank 1
answered on 22 Sep 2020, 08:48 PM

hello, thanks for helping me.

the second link helped me to fix my problem. it was tricky but now, I'm using it and it's working fine.

thanks so much.

Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
amdagha
Top achievements
Rank 1
Answers by
Nadya
Telerik team
amdagha
Top achievements
Rank 1
Share this question
or