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

Time Picker

5 Answers 162 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mathews
Top achievements
Rank 1
Mathews asked on 19 Aug 2008, 11:55 AM
Hello
i  had a problem with time picker(rad).am using 1.2.2.1 version.

<

radCln:RadTimePicker ID="tpArrivalTime" runat="server">

<TimeView runat="server" StartTime="0:0:0" EndTime="23:31:00" Interval="0:30:0" Columns="5" TimeFormat="HH:mm"

Culture="en-US">

</TimeView>

<DateInput DateFormat="HH:mm" Culture="en-US">

</DateInput>

<DatePopupButton Visible="False" />

</radCln:RadTimePicker>
am not getting the selected time .am getting the selected date with time.do this control have property to get time itself or else how to get the value in the textbox field after selecting the time (in code behind not javascript)

regards
Mathews Baby

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 19 Aug 2008, 12:28 PM
Hello Mathews,

Check out the following code snippet to achieve the required scenario.
aspx:
<rad:RadTimePicker id="RadTimePicker1" Runat="server" AutoPostBack="True" OnSelectedDateChanged="RadTimePicker1_SelectedDateChanged"
      <timeview skin=""></timeview> 
      <dateinput autopostback="True" skin=""></dateinput> 
      <datepopupbutton visible="False"></datepopupbutton> 
</rad:RadTimePicker> 

cs:
protected void RadTimePicker1_SelectedDateChanged(object sender, SelectedDateChangedEventArgs e) 
    { 
        string strDateRadTimePicker1.SelectedDate.Value.ToShortTimeString(); 
    } 

Thanks
Princy.
0
Mathews
Top achievements
Rank 1
answered on 19 Aug 2008, 02:19 PM
thanks for the reply Princy

Hello one more think to ask
how can i set time to timepicker(rad).from database am returning ''12:45 PM".
i need to set this value to time picker.
RadTimePicker1.selecteddate="12:45"
but its not reflecting ;its showing default 12:00
plese send me reply soon

regards
Mathews Baby
0
Shaun Peet
Top achievements
Rank 2
answered on 19 Aug 2008, 07:11 PM
RadTimePicker1.SelectedDate = New Date(Today.Year, Today.Month, Today.Day, 12, 45, 0)
0
Randy
Top achievements
Rank 1
answered on 08 Mar 2010, 07:15 PM
This isn't working.  No matter what I do I can't set the time from the code behind.

protected void rdpEndDate_Load(object sender, EventArgs e)  
        {  
            this.rdpEndDate.SelectedDate  = new DateTime(getThisFriday(System.DateTime.Now).Year, getThisFriday(System.DateTime.Now).Month, getThisFriday(System.DateTime.Now).Day, 23, 59, 59);  
        }  
        protected void rdpEndDate_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)  
        {  
            this.rdpEndDate.SelectedDate = new DateTime(e.NewDate.Value.Year, e.NewDate.Value.Month, e.NewDate.Value.Day, 23, 59, 59);  
        }  
        protected void rdpStartDate_Load(object sender, EventArgs e)  
        {  
            this.rdpStartDate.SelectedDate = Convert.ToDateTime(getLastFriday(System.DateTime.Now).ToShortDateString());  
             
        } 
0
Sebastian
Telerik team
answered on 09 Mar 2010, 10:34 AM
Hello Randy,

Review my reply in the other forum thread you participated in which discusses the same subject:
http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/174989-datetimepicker-problem.aspx

Kind regards,
Sebastian
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Mathews
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Mathews
Top achievements
Rank 1
Shaun Peet
Top achievements
Rank 2
Randy
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or