Get DateTime of RadDateTimePicker clientside

3 posts, 1 answers
  1. Datamex
    Datamex avatar
    161 posts
    Member since:
    Jun 2012

    Posted 23 Sep 2009 Link to this post

    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. Answer
    Peter
    Admin
    Peter avatar
    6637 posts

    Posted 28 Sep 2009 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Datamex
    Datamex avatar
    161 posts
    Member since:
    Jun 2012

    Posted 28 Sep 2009 Link to this post

    Hi Peter,

    The solution you provided is working.
    Thank you!

Back to Top