Set Initial Time in Selector

3 posts, 1 answers
  1. Josh
    Josh avatar
    22 posts
    Member since:
    Jun 2012

    Posted 21 Dec 2011 Link to this post

    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. Answer
    Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 27 Dec 2011 Link to this post

    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 >>

  3. DevCraft banner
  4. Josh
    Josh avatar
    22 posts
    Member since:
    Jun 2012

    Posted 27 Dec 2011 Link to this post

    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.
Back to Top