This is a migrated thread and some comments may be shown as answers.
DateTimePicker
1 Answer 24 Views
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 2
Bill asked on 22 Sep 2010, 06:37 PM
I am using version 2009.3.1314.35 of the Telerik controls.

When I place a datetimepicker control on an empty form, I am expecting to see a control.SelectedTime property. However, I don't see it.

<

 

telerik:RadTimePicker ID="RadTimePicker1" runat="server">

 

 

</telerik:RadTimePicker>

Inside my designer file, I have the following:

 

 

/// <summary>

 

 

 

 

 

/// RadTimePicker1 control.

 

 

 

 

 

/// </summary>

 

 

 

 

 

/// <remarks>

 

 

 

 

 

/// Auto-generated field.

 

 

 

 

 

/// To modify move field declaration from designer file to code-behind file.

 

 

 

 

 

/// </remarks>

 

 

 

 

 

protected global::Telerik.Web.UI.RadTimePicker RadTimePicker1;

 

 


How can I get this property value to appear in the code behind?

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 1
answered on 23 Sep 2010, 07:17 AM
Hello William,

You could use the SelectedDate property of RadTimePicker to get the time selected. And you can extract the time from the SelectedDate value.

C#:
     DateTime dt = RadTimePicker1.SelectedDate.Value;
     dt.TimeOfDay.ToString();


-Shinu.
Asked by
Bill
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 1
Share this question
or