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

Date gets changed after updating time in RadDatetimePicker

5 Answers 131 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Mandy
Top achievements
Rank 2
Mandy asked on 03 Feb 2011, 07:59 AM
Hello Admin,

i am getting problem with RadDateTime picker control i.e.while clicking to edit the time in the date control field ,The date gets changed to the today's date,and existing date was changed,This should not be happen i only need to change the time,

Please provide me any solution on this ASAP,

Thanks

5 Answers, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 07 Feb 2011, 12:48 PM
Hello Mandeep,

I tried to reproduce the described issue, but to no avail. Could you please post your RadDateTimePicker control declaration with a related code behind file and any javascript code which is related with the control. Thus we will be able to gather more details about your scenario and provide you with more to-the-point answer.

All the best,
Radoslav
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Mandy
Top achievements
Rank 2
answered on 08 Feb 2011, 02:04 PM
Hello Admin,

Thanks for the reply, i had attached two screen shots i.e.date before and After make change to time, please have a look and provide the solution ASAP,

<telerik:RadDateTimePicker ID="rdpDueDate" ClientEvents-OnDateSelected="rdpDueDatechange"
                            onfocus="javascript:rdpDueDateFocus();" runat="server">
                        </telerik:RadDateTimePicker>

 function rdpDueDatechange(sender, args) {
                document.getElementById("hdrdpDueDate").value = String.format("{0:M/d/yyyy h:mm tt}", args.get_newDate());
            }

function rdpDueDateFocus() {
                document.getElementById('rdpDueDate_dateInput_text').value = document.getElementById("hdrdpDueDate").value;
            }


Thanks,
0
Radoslav
Telerik team
answered on 11 Feb 2011, 12:31 PM
Hello Mandeep,

I tried to reproduce the described issue but to no avail. I am sending you a simple example based on your code snippets. Please check it out and let me know what differs in your case.
Looking forward for your reply.

Best wishes,
Radoslav
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Mandy
Top achievements
Rank 2
answered on 28 Feb 2011, 08:29 AM
Hello admin,

                   Thanks for reply, but my issue still present in my scenario, let me describe further for more clarification .
i have saved due date for my current project in database and when i retrieve the same i assign that value to the RadDatetimepicker control. let us suppose the date stored in database was 2/23/2011 6:00 AM. and i tried to edit it on  24th of feb means 2/24/2011 .

But i don't want to change the date instead i just want to change time to 7:00 PM.and the date should remains same in this case.

Now the problem arise when i update time to 7:00 PM date gets changed to 2/24/2011 as well.


Please provide the solution ASAP .


Thanks,
0
Radoslav
Telerik team
answered on 02 Mar 2011, 01:53 PM
Hi Mandeep,

Could you please post the code for a date time calculation over the saved in a database date. Also could you please try setting the Time zone on your computer to be the UTC (Coordinated Universal Time) and let me know if the issue still exists.

Regards,
Radoslav
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Calendar
Asked by
Mandy
Top achievements
Rank 2
Answers by
Radoslav
Telerik team
Mandy
Top achievements
Rank 2
Share this question
or