Hi
I have Telerik Q3 2010. I used radDatetimePicker in my form but it does not work.
when I click any date in datetimepicker it does not show date in that.
I used this code in main() function of my program.cs file to have persian calander.
Thread.CurrentThread.CurrentCulture =
new
System.Globalization.CultureInfo(
"fa-IR"
);
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
when I delete this code and set the culture of radDatetimePicker to fa-IR, it displays an error (I attached the picture of that error)
how can I solve this problem?
thanks in advance
19 Answers, 1 is accepted

To set the calendar to display persian characters, you can set
CultureInfo info =
new
CultureInfo(
"fa-Ir"
);
this
.radDateTimePicker1.Culture = info;
Hope that helps
Richard

Tank you for answer
Now the calandar shows the persian calander, but when I choose a day (and cliick on it) it does not show it.(in text section)
I attached the image.
Should I change any other property to work properly?
thanks

I'm afraid I cannot replicate your issue. Please try this in a new project. Simply drag on a RadDateTimePicker onto a blank form, add the following lines in the form load event
CultureInfo info =
new
CultureInfo(
"fa-Ir"
);
this
.radDateTimePicker1.Culture = info;
If you have further issues, please let me know, and post a sample that replicates it here.
Thanks
Richard

thanks for answer
But it is not working yet
I attached the picture of error.

I'm afraid I cannot replicate your issue, even if I change my regional settings. Please can you confirm if you are using the latest SP1 edition of the controls? Also you mentioned before that the caledar now showed correctly, though you could not click on it. If you are not using the latest version I would suggest upgrading
Let me know if you have further issues
Richard

As I said in my first post I use RadControls foe WinForms Q3 2010
I mentioned that I could click on it, but the date would not be selected.
Should I install a newer version of RadControls?

If you are not on the latest Service Pack, then yes, I would advise to upgrade. However, are there any other settings that could be affecting this such as your regional settings? Remember that the RadDateTimePicker does not support other calendars other then the gregorian calendar as far as I'm aware.
Regards,
Richard

Can you please use the correct codes and put it in a simple c# project so that I can try it if the problem is about the verrsion i use or not
Thanks very much

I cannot attach projects here. Please ry downloading the latest trial version which can be found here and try my suggestion above with that. Please ensure that you are not trying to change the calendar however, only the culture.
Hope that helps
Richard

now that I see the file, I found I have the same version (last version)
so there should be another reason for not working properly, isn't it?
Now that I have the latest version, would you please help me about this problem?
Thanks

Have you followed the exmaples above? If so, and it is still not functioning, please post a sample that replicates your issue, together with any other settings that could affect this such as your computer regional settings and I'll do my best to help
Richard

Hello
I have followed the example and tryed it many times with differnet cultures but i could not find out why DateTimePicker did not work(I have win7)
By the way I decided to use another customized Persian DateTimePicker.
Thanks a lot for spending time for me.

If you would like to post a sample that replicates your issue, i'll look at it for you.
thanks
Richard
Thank you for writing.
The case where the date is not displayed is possible when MinDate and NullDate properties have the same value. For this reason I would suggest that you try the following code:
radDateTimePicker1.NullDate = radDateTimePicker1.NullDate.AddDays(-1);
If this does not help, please open a new support ticket, where you can attach your project. This will allow me to investigate your case further and provide you with adequate support.
I am looking forward to your reply.
Kind regards,
Stefan
the Telerik team

Hello
thank you for answer.
I tried this code but it does not show persian calendar yet.
I have Win 7 and I set Persian Format in Region and Language and the Location is Iran and my Calendar Type is Gregorian.
I tried different Calendar Types too but it did not answer.
I had another question and Posted in this thread about two days ago but nobody helped me.
Please take a look at it too.
Thanks a lot.
Thank you for writing back.
My previous reply was not for this thread. Please accept my apologies for the mistake.
Regarding your question, if you want a Persian calendar, you will have to use a custom one or implement it yourself since our controls support only Gregorian calendar.
The current culture determines only the way the days of the week and the month are displayed. It does not change the layout of the RadCalendar. If you have issues setting the current culture to Iran's culture and displaying the dates according to it, please refer to the attached project.
If you decide to go with different calendars, you might find those links helpful: link, link
As to your other thread, please note that we do support our customers within 72 hours (Mon-Fri) for forum threads and within 24-48-72 hours for support tickets (depending on the license that you have). In order to receive such a support, please provide the details requested in thread "How to combine two fields into one single field?"
Please have in mind that not providing license information may lead to a denial of support services for your account.
I hope this helps.
Greetings,
Stefan
the Telerik team

Hello
Thanks for your answer

Thank you for contacting us.
Could you share with us more details about this issue, because we were unable to reproduce it.
We will also appreciate if you send us a sample application. This will allow us to understand the exact case where the issue occurs, hence help you further.
Please note that you have to open a new support ticket in order to be able to attach your files.
Thank you for your time and cooperation.
Peter
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!