RadTimePicker do not return correct date from CustomTimeValues in JavaScript

2 posts, 0 answers
  1. JJ
    JJ avatar
    21 posts
    Member since:
    Jul 2014

    Posted 15 Jul 2015 Link to this post

    //ASP.net 
    <telerik:RadTimePicker runat="server" ID="rtpStopTime" Width="80px"  ValidationGroup="GridChanges" OnLoad="rtpStopTime_DataBinding"
                                    ClientEvents-OnDateSelected="MCRPostShiftStopTimePickerOnTimeSelect">
                                    <DateInput ID="DateInput2" runat="server" AutoCompleteType="None" TabIndex="3"></DateInput>
                                    <TimeView ID="TimeView2" runat="server" Interval="15" Columns="8" AlternatingTimeStyle-BackColor="#F6F6F9"></TimeView>
                                </telerik:RadTimePicker>

    //C#:

    protected void rtpStartTime_DataBinding(object sender, EventArgs e)
            {
                RadTimePicker TimeBox = (RadTimePicker)sender;
                TimeBox.TimeView.CustomTimeValues = StartTimeArray; //6:00 - 23:45 Date = '2015/01/01' ; 0:00 - 5:45 Date = '2015/01/02'
            }

    function MCRPostShiftStartTimePickerOnTimeSelect(sender, eventArgs) {
     
                  //not sending the correct date from customvalues for values over midnight
     
                  //alert("Start Time " + eventArgs.get_newValue());
                  //alert("Start Date " + eventArgs.get_newDate());
                  //var date = eventArgs.get_renderDay().get_date();
                  //alert("Start Date " + date);
                
                  //var timepicker = sender;
                  //alert("timepicker " + timepicker);
                  //var selectedDate = timepicker.get_selectedDate().format("yyyy/MM/dd");
                  //var selectedTime = timepicker.get_selectedDate().format("HH:mm:ss")
                  //alert("Start: " + selectedDate + " " + selectedTime);
     
              }

  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 20 Jul 2015 Link to this post

    Hello JJ,

    See the forum thread below for more information on this matter:
    http://www.telerik.com/forums/times-past-midnight

    Regards,
    Maria Ilieva
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top