6 Answers, 1 is accepted
The RadDateTimePicker allows you to select the time and date separately through two popups. If you select only the time, however, it needs to populate the date as well, and it chooses the current date unless something else is specified. If you want to have both components separate, you can put a date picker and a time picker next to each other. For example:
<telerik:RadDatePicker runat="server" ID="rdp1"></telerik:RadDatePicker><telerik:RadTimePicker runat="server" ID="rtp1"></telerik:RadTimePicker><asp:Button Text="get date and time" ID="btn1" OnClick="btn1_Click" runat="server" /><asp:Button Text="set time" ID="btn2" OnClick="btn2_Click" runat="server" />protected void btn1_Click(object sender, EventArgs e){ Response.Write(string.Format("selected date: {0}<br />selected time: {1}", rdp1.SelectedDate, rtp1.SelectedTime));}protected void btn2_Click(object sender, EventArgs e){ rtp1.SelectedTime = new TimeSpan(10, 11, 12);}Regards,
Marin Bratanov
Progress Telerik
@Jeff - I suspected as much, but I had to note it, that's why it was at the end as an aside note.
@Hector - Perhaps you could use two time pickers with templates so you can show what you want them to show: https://demos.telerik.com/aspnet-ajax/timepicker/functionality/timeview-templates/defaultcs.aspx. Their input would still show both hours and minutes, though. If you want such granular choice, I suggest you also consider simple dropdowns for that - a dropdown with 12 elements for hours, and a dropdown with 60 elements for minutes.
Regards,
Marin Bratanov
Progress Telerik