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

Javascript Timezone date on client

1 Answer 56 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Rick
Top achievements
Rank 1
Rick asked on 18 Apr 2010, 01:21 AM
I am trying to make a meeting scheduler.

I am getting the start time that a user clicks on when inserting/editing an appointment in the javascript below:
function OnClientAppointmentInserting(sender, eventArgs) {  
    var sTime = escape(eventArgs.get_startTime());  
I am getting a date string like so:

Fri Apr 16 13:00:00 PDT 2010

and passing it to a new url. In the code behind, I am having a problem converting this back into a datetime.

Can you give me a clue as to how to convert this back to a datetime object?

Thanks,

Rick

1 Answer, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 19 Apr 2010, 04:40 PM
Hello Rick,

The format() method of the dateTime client object can be helpful in this case:
function OnClientAppointmentInserting(sender, eventArgs) {
           var sTime =eventArgs.get_startTime().format("yyyy/MM/dd HH:mm"); 
           alert(sTime);  
       }



Peter
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
Scheduler
Asked by
Rick
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or