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

RadTimePicker OnSelectedDateChanged not firing when using cursors

2 Answers 67 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Egbert
Top achievements
Rank 1
Egbert asked on 05 Nov 2013, 02:52 PM
Hi,

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.

Thanks,
Egbert

2 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 08 Nov 2013, 11:40 AM
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.

 

Regards,
Konstantin Dikov
Telerik
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.
0
Egbert
Top achievements
Rank 1
answered on 11 Nov 2013, 09:46 AM
Hi,

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,
Egbert
Tags
General Discussions
Asked by
Egbert
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Egbert
Top achievements
Rank 1
Share this question
or