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

Get DateTime of RadDateTimePicker clientside

2 Answers 128 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
Datamex
Top achievements
Rank 2
Datamex asked on 23 Sep 2009, 08:58 AM
Hi,

We are using your RadDateTimePicker to select a date and time for an appointment.
Now i am trying to get the selected datetime clientside by using the startTimePicker.get_selectedDate(); function.

I get following value back from the datetimepicker : "Wed Sep 23 09:00:00 UTC+0200 2009".
I get the correct datetime back, but the control adds a "UTC+0200" to my datetime.

So when i put this value as a parameter to a webservice call, i get the datetime value minus 2 hours on the server.

How can i fix this problem? 

2 Answers, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 28 Sep 2009, 11:25 AM
Hello,

Can you please try formatting your code to use the format method.
***  
startTimePicker.get_selectedDate().format('yyyy/MM/dd HH:mm:ss')  
*** 


Greetings,
Peter
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
Datamex
Top achievements
Rank 2
answered on 28 Sep 2009, 11:44 AM
Hi Peter,

The solution you provided is working.
Thank you!

Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
Datamex
Top achievements
Rank 2
Answers by
Peter
Telerik team
Datamex
Top achievements
Rank 2
Share this question
or