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

Set Initial Time in Selector

2 Answers 56 Views
TimePicker and TimeSelector
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Josh
Top achievements
Rank 1
Josh asked on 22 Dec 2011, 05:07 AM
When using a RadTimePicker, is there a way to set the initial time that is displayed in the RadTimeSelector that pops up?

I don't think setting the Value will work, because pressing back or cancel will still leave that value.

2 Answers, 1 is accepted

Sort by
0
Accepted
Valentin.Stoychev
Telerik team
answered on 27 Dec 2011, 09:56 AM
Hi Josh,

If I understand you correctly you want to display a time in the selector control which is not set to the Value property? If this is the case - this is not supported at the moment.

What you can do is to handle this manually. You can set the Value property and after that to handle the ValueChangedEvent. If the event is not raised - this means that the user has not changed it.

Will this work for you?

Kind regards, Valentin.Stoychev
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Josh
Top achievements
Rank 1
answered on 27 Dec 2011, 05:29 PM
Yes, this should work.

It would be nice if there was something more simple like a property for "InitialValue" or something. Basically, what I want to achieve is to have the time that is displayed rounded up to the nearest hour instead of the current time. So maybe even a setting for having the initial value be current time, next hour, or next day or something. I need to have the time picker be empty though, otherwise it would be fairly easy to do. But yes, the solution you suggested should work.
Tags
TimePicker and TimeSelector
Asked by
Josh
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
Josh
Top achievements
Rank 1
Share this question
or