How to make RadTimePicker to parse input string from code

3 posts, 0 answers
  1. Alexus
    Alexus avatar
    3 posts
    Member since:
    Nov 2012

    Posted 21 Jan 2013 Link to this post

    Hello.
    Question is "How to tell RadTimePicker to parse input text from CurrentDateTimeText property and refresh SelectedTime property by parsed value".

    Background:
    My control consists from RadTimePicker and two buttons - accept and cancel.
    It works but there is an issue.
    If user input "1234" to the picker an then press accept button without pressing enter - there is old value in  SelectedTime property (but  CurrentDateTimeText contains user`s input). 

    Thanks.
  2. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 24 Jan 2013 Link to this post

    Hi Alex,

    Setting the RadTimePicker's DateTimeText property will force an update of the SelectedValue. Here is sample code:
    this.RadTimePicker.DateTimeText = this.RadTimePicker.CurrentDateTimeText;

    Call this on the Accept button and everything should work as expected.

    Kind regards,
    Ivo
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Alexus
    Alexus avatar
    3 posts
    Member since:
    Nov 2012

    Posted 28 Jan 2013 Link to this post

    This is exactly what I need.

    Frankly, I have extracted this code from controls with decompiler day earlier ;)

    Anyway, thanks a lot for reply!
Back to Top