RadTimePicker OnSelectedDateChanged not firing when using cursors

3 posts, 0 answers
  1. Egbert
    Egbert avatar
    21 posts
    Member since:
    Dec 2010

    Posted 05 Nov 2013 Link to this post


    When I use the RadTimePicker, OnSelectedDateChanged will be fired when:

    - Clicking on the clock after the time textbox
    - Using cursor keys to change the time and change the focus to another control

    It will NOT be fired when only using the cursor keys and leaving the focus on the timepicker.
    I would like to use this to calculate a duration between a begin and end time.

    If this is not possible, how can I do this on the client?
    Calculate the duration between 2 timepickers and put the result in another timepicker.

  2. Konstantin Dikov
    Konstantin Dikov avatar
    2466 posts

    Posted 08 Nov 2013 Link to this post

    Hello Egbert,

    Thank you for contacting us.

    The initial requirement that you have could not be achieved due to the way that the RadTimePicker is implemented. The values are actually changed/set when the control is blurred.

    Notwithstanding, you could achieve the desired functionality entirely on client. For your convenience I have prepared for you a sample page with the functionality in question. Please refer to the attached files and see if this approach works for your scenario.

    Just one clarification. Please note that the RadTimePicker is actually setting a Date object and not just time values. This means that you could not set the difference between two pickers to another picker. As you will see in the provided sample page, the difference is parsed to hours and minutes and is set in text box control. 

    If further assistance is needed, please do not hesitate to contact us again.


    Konstantin Dikov
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. Egbert
    Egbert avatar
    21 posts
    Member since:
    Dec 2010

    Posted 11 Nov 2013 Link to this post


    Thank you for the info.
    I hoped that only using the cursor keys would also trigger an event, but if that's not the case so be it.

    Thanks again,
Back to Top