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

Wrong date format

5 Answers 150 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Mario Turcotte
Top achievements
Rank 1
Mario Turcotte asked on 30 Sep 2009, 08:40 PM
Hello all, first I am sorry if that question has already been asked and answered. If this is the case I would be grateful if someone can point me to the answer. Due to my work slow connection it take more then 2 minutes to get a page loaded and searching through is not an option at the moment.

Here is my problem, I have two radDateTimePicker, one for Starting Date and one for Ending Date. I have set the DateInput format as follow.

<telerik:RadDateTimePicker ID="rdtp_StartingDate" runat="server">                                                  
    <DateInput DateFormat="dd/MM/yyyy hh:mm tt" DisplayDateFormat="dd/MM/yyyy hh:mm tt" runat="server"></DateInput> 
    <Calendar DayCellToolTipFormat="dd/MM/yyyy" runat="server"></Calendar> 
</telerik:RadDateTimePicker> 
 

The culture of the two calendars is set from the codebehind, since the application I'm supporting, support two language.

When I retrieve the values from the database, the date input format is displayed correctly. When I click on the Calendar image to get the Calendar popup, I mouse over the dates and the tooltip is fine to. The problem arise when I click on a date, if the day I select is smaller then 12 it switch the format to default. i.e. selecting first of june will display "06/01/2009 12:00 AM" instead of "01/06/2009 12:00 AM" if I pick 21st of june it will display "21/06/2009 12:00 AM" which is the correct format.

Thank you in advance.

5 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 06 Oct 2009, 09:23 AM
Hello Mario,

I tried to reproduce the issue but without success. Based on your code I am attaching a sample project that runs as expected on my side.

I hope this helps

Regards,
Martin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Mario
Top achievements
Rank 1
answered on 14 Oct 2009, 01:18 PM
Hello Martin, thanks for your quick response.

I found that this will happen when you set the calendar input to read only. For some reason if the day picked is smaller then 12 it will switch day-month and the next time you open the calendar it will move to the wrong month.
0
Martin
Telerik team
answered on 19 Oct 2009, 04:34 PM
Hello Mario,

I am attaching a modified version of the sample project reflecting the ReadOnly setting. However I am still unable to reproduce the issue on my end. Please give it a try and verify whether you still get the erroneous behavior. 

Regards,
Martin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Erwin
Top achievements
Rank 1
answered on 20 Apr 2010, 10:41 AM
I have the same problem.

I have tested your sample code but it does not work in my part.

In your sample I tried to open the calendar pop-up then click  January 1,  2010.

Then I open the calendar pop-up and click  January 8,  2010.

When I click the calendar pop-up button, the calendar pops up then the selected date in the calendar is August 1 2010.

I can't find a better solution of this.

Attached are the Screen Shots of your sample code that i test.

Please tell me if this is fixed in the lates release?

0
Martin
Telerik team
answered on 20 Apr 2010, 04:50 PM
Hello Erwin,

I am afraid that I am still not able to reproduce the issue locally. Attached is the sample website equipped with the latest version of RadControls for ASP .NET AJAX (Q1 2010 SP1 trial). Please give it a try and let me know what your findings are.

Regards,
Martin
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Calendar
Asked by
Mario Turcotte
Top achievements
Rank 1
Answers by
Martin
Telerik team
Mario
Top achievements
Rank 1
Erwin
Top achievements
Rank 1
Share this question
or