Get the Time selected as codebehind

2 posts, 1 answers
  1. Pierre
    Pierre avatar
    138 posts
    Member since:
    Feb 2006

    Posted 26 Mar 2008 Link to this post

    Hi,
    Could help me to get the time as codebehind. I have created one TimePicker but I'm not able to open the popup and get the time to link to my code

    How to allow pick the Time in the aspx page and Use the selected time in the Codebehind cs.

    <telerik:RadTimePicker ID="RadTimeIn" runat="server" style="vertical-align:middle;" Width="30px">  
                            <TimeView StartTime="12:0:0" EndTime="21:31:00" Interval="0:30:0" Columns="5" TimeFormat="HH:mm" Culture="en-US" runat="server">   
                            </TimeView> 
                            <DateInput DateFormat="HH:mm" Culture="en-US" runat="server"></DateInput>   
                        </telerik:RadTimePicker> 
    cs

    DateTime

    timeIn = ?

    Time is DataTime or string?

    regards

  2. Answer
    Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 27 Mar 2008 Link to this post

    Hello Pierre,

    You could use the following code, which  specify the format string:

    RadTimeIn.SelectedDate.Value.ToString("HH:mm")

    Just modify the string format to cover your requirements.
    I hope this helps.

    All the best,
    Maria Ilieva
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top