This is a migrated thread and some comments may be shown as answers.

Get the Time selected as codebehind

1 Answer 106 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Pierre
Top achievements
Rank 1
Pierre asked on 26 Mar 2008, 02:21 PM
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

1 Answer, 1 is accepted

Sort by
0
Accepted
Maria Ilieva
Telerik team
answered on 27 Mar 2008, 02:40 PM
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
Tags
Calendar
Asked by
Pierre
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or