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

How do you place the Scheduler get_startTime() string into a RadDateTimeInput field?

1 Answer 70 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sherry
Top achievements
Rank 1
Sherry asked on 05 Mar 2009, 02:12 PM
I procure the get_startTime() value on the client side when a user double-clicks a time and receive this value: "200903051400" and I try to place it into a RadDateTimePicker control but it doesn't recognize the string.  I would assume that the RadScheduler would spit out a string that would be translatable throughout other RadControls.  I have the Culture set for US on both controls.

Thanks!

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 09 Mar 2009, 09:45 AM
Hi Edward,

You can use the format method of the start time object . Also, the set_selectedDate method of RadDateTimePicker  expects a Date object, not a string. Here is a code sample to illustrate this:

  function OnClientAppointmentInserting(sender, eventArgs)   
        {  
            var start = eventArgs.get_startTime().format("yyyy/MM/dd hh:mm");  
            var dateTimePicker = $find('<%=RadDateTimePicker1.ClientID %>');  
            dateTimePicker.set_selectedDate(new Date(start));  
        } 




Greetings,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
Sherry
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or