Time control

2 posts, 0 answers
  1. Jaymie
    Jaymie avatar
    57 posts
    Member since:
    Jan 2009

    Posted 19 May 2010 Link to this post

    So, here goes.

    I have a user requirement. The basically need 1 textbox, it doesnt matter if it is a masked textbox or a datetimepicker or whatever.
    This textbox needs to allow only hh:mm and when it gains focus it needs to select the whole of the contents.

    When the user navigates to this textbox initially, it should be blank (it can be __:__ if masked) and should allow a user to type:

    0125

    without needing to press any other keys (01 is the hours and 25 is the minutes). The control should be smart enough to display 01:25 but not require the user to press the arrow keys to move from hours to minutes.

    I have tried this using the maskededitbox and found that it doesnt work as intended and I cant clear the text if I set the mask to ##:## which is annoying. I then used the datetimepicker and selected time, but it has hh:mm:ss and to get from hours to minutes you have to use the arrow key.

    Any help you can give would be greatly appreciated.
  2. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 25 May 2010 Link to this post

    Hello Jaymie,

    Thanks for contacting us and for the details on your case.

    Currently, RadMaskedEditBox does not fully support the described behavior. You can set the MaskType to DateTime and set the Mask to HH:MM. This will restrict the input only to valid time in 24 hour format. However, you cannot show '_' placeholders in this case.

    Also, when typing you should manually switch to the minutes part of the input to edit it. The control does not automatically do this out of the box.

    Since your requirements are interesting, we will put them in our TODO list and will try to implement them as soon as possible. You can track the status of this request via our Public Issue Tracking System:
    http://www.telerik.com/support/pits.aspx#/public/winforms/2238

    Do not hesitate to write back in case you have further questions or need assistance.

    Kind regards,
    Deyan
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top