RadTimePicker Set the Default Value

3 posts, 1 answers
  1. Jesse
    Jesse avatar
    2 posts
    Member since:
    Jul 2013

    Posted 28 Jan 2014 Link to this post

    Can someone help explain how I set the default value in teh a RadTimePicker.  By that I mean when my page loads I want to see 12:00 AM in one case and  23:59 AM in another case.  I have tried so many different things with no luck!
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 28 Jan 2014 in reply to Jesse Link to this post

    Hi Jesse,

    Please have a look into the sample code snippet to achieve your scenario.

    ASPX:
    <telerik:RadTimePicker ID="RadTimePicker1" runat="server" TimeView-TimeFormat="HH:mm">
    </telerik:RadTimePicker>

    JavaScript:
    <script type="text/javascript">
        function pageLoad() {
            var time = $find("<%=RadTimePicker1.ClientID %>");
            //your condition
            time.get_dateInput().set_value("12:00 AM");
            //else
            time.get_dateInput().set_value("23:59 AM");
        }
    </script>

    Thanks,
    Shinu.
  3. Jesse
    Jesse avatar
    2 posts
    Member since:
    Jul 2013

    Posted 29 Jan 2014 in reply to Shinu Link to this post

    Many Thanks, despite my typos, you got me what I needed.  Thanks!
Back to Top