How to get and set Date & Time in RadDateTimePicker in "dd MMM yyyy hh:mm:ss" format

4 posts, 0 answers
  1. Brijendra Kumar
    Brijendra Kumar avatar
    38 posts
    Member since:
    Oct 2008

    Posted 17 Dec 2008 Link to this post

    Hi All,

    I have taken a telerik:RadDateTimePicker control.
    how to get or set its values in "dd MMM yyyy hh:mm:ss" format using javascript.
    DOes anybody know then please tell me.

    I will be highly greatful to yours!!!!!!!!!!!!

    Brijendra Pandey
  2. Daniel
    Daniel avatar
    4949 posts

    Posted 17 Dec 2008 Link to this post

    Hello Brijendra,

    Please try the following:
    <script type="text/javascript" language="javascript"
        function setDateFormat() 
            var dateInput = $find('<%= RadDateTimePicker1.ClientID %>').get_dateInput(); 
            dateInput.set_displayDateFormat("dd MMM yyyy hh:mm:ss"); 
            dateInput.set_dateFormat("dd MMM yyyy hh:mm:ss"); 

    Let us know whether this helps.

    Kind regards,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Ram
    Ram avatar
    97 posts
    Member since:
    Jun 2011

    Posted 12 Jul 2011 Link to this post

    I Using RadDateTimepicker.
    Following is my code.
    <telerik:RadDateTimePicker ID="begnDate" runat="server"  Width="84%"  
             Height="10px" style="margin-top:-4px;"
             <DateInput  DateFormat="dd/MM/yyyy hh:mm tt" runat="server" DisplayDateFormat="MM/dd/yyyy"/>
             <TimeView TimeFormat="t" runat="server" />
             <HideAnimation Type="Slide" />
             <ShowAnimation Type="Slide" />
             <DatePopupButton ImageUrl="../images/Cal_iconj.gif" HoverImageUrl="../images/Cal_iconj.gif"/>
             <TimePopupButton ImageUrl="../images/watch.gif" HoverImageUrl="../images/watch.gif"/>
    Here I need to set the date and time individually. means
    When I selected calender i should get only by using timer I should select Time.
    I'm able to select only date but when I select the time that was not added to date (textbox).
    How cloud i achieve this.
    pls help me 
  4. Daniel
    Daniel avatar
    4949 posts

    Posted 18 Jul 2011 Link to this post

    Hello Ram,

    The display format of your RadDateTimePicker is declared in such way that only date is shown. You have to set it like this MM/dd/yyyy hh:mm tt in order to see the time value.

    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Back to Top