Javascript Timezone date on client

2 posts, 1 answers
  1. Rick
    Rick avatar
    2 posts
    Member since:
    Jan 2009

    Posted 17 Apr 2010 Link to this post

    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?


  2. Answer
    Peter avatar
    6637 posts

    Posted 19 Apr 2010 Link to this post

    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"); 

    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.
Back to Top