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

radDatetimePicker does not work?

19 Answers 358 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
hosein
Top achievements
Rank 1
hosein asked on 26 Jan 2011, 10:58 AM

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,radDatetimePicker works correctly. (but not in fa-IR culture)

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

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 26 Jan 2011, 04:55 PM
Hello,

To set the calendar to display persian characters, you can set
CultureInfo info = new CultureInfo("fa-Ir");
this.radDateTimePicker1.Culture = info;
 However, the calendar supports the Gregorian calendar only. Please review this forum post for full information

Hope that helps
Richard
0
hosein
Top achievements
Rank 1
answered on 27 Jan 2011, 06:12 AM

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

0
Richard Slade
Top achievements
Rank 2
answered on 27 Jan 2011, 09:52 AM
Hello,

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;
and the calendar should behave normally.

If you have further issues, please let me know, and post a sample that replicates it here.
Thanks
Richard
0
hosein
Top achievements
Rank 1
answered on 27 Jan 2011, 04:54 PM

thanks for answer

But it is not working yet

I attached the picture of error.

0
Richard Slade
Top achievements
Rank 2
answered on 27 Jan 2011, 05:13 PM
Hello,

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
0
hosein
Top achievements
Rank 1
answered on 27 Jan 2011, 07:21 PM

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?

0
Richard Slade
Top achievements
Rank 2
answered on 27 Jan 2011, 08:18 PM
Hello,

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
0
hosein
Top achievements
Rank 1
answered on 28 Jan 2011, 07:26 AM
Hi
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
0
Richard Slade
Top achievements
Rank 2
answered on 28 Jan 2011, 10:06 AM
Hello,

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
0
hosein
Top achievements
Rank 1
answered on 28 Jan 2011, 03:25 PM

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

0
Richard Slade
Top achievements
Rank 2
answered on 28 Jan 2011, 03:32 PM
Hello,

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
0
hosein
Top achievements
Rank 1
answered on 29 Jan 2011, 08:11 PM

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.

0
Richard Slade
Top achievements
Rank 2
answered on 29 Jan 2011, 08:39 PM
Hello,

If you would like to post a sample that replicates your issue, i'll look at it for you.
thanks
Richard
0
Stefan
Telerik team
answered on 31 Jan 2011, 05:43 PM
Hello guys, 

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
Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
0
hosein
Top achievements
Rank 1
answered on 01 Feb 2011, 12:40 PM

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.

0
Accepted
Stefan
Telerik team
answered on 04 Feb 2011, 12:46 PM
Hello hosein, 

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
Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
0
hosein
Top achievements
Rank 1
answered on 05 Feb 2011, 10:19 AM

Hello

Thanks for your answer

0
Predhin
Top achievements
Rank 1
answered on 07 Jul 2011, 10:35 AM
RadDateTime Picker is not popping up when placed in Panel bar control ? Please help ...
0
Peter
Telerik team
answered on 13 Jul 2011, 10:08 AM
Hi Predhin, 

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.

Regards,
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!

Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
hosein
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
hosein
Top achievements
Rank 1
Stefan
Telerik team
Predhin
Top achievements
Rank 1
Peter
Telerik team
Share this question
or