Using tab to move between sections in a DatePicker

2 posts, 0 answers
  1. David
    David avatar
    3 posts
    Member since:
    Jun 2012

    Posted 09 Nov 2011 Link to this post

    Ok, so our client wants to type in mouse at all.

    What they would like to do is use tab instead of arrows to move between month/date/year fields. Is this possible?

  2. Peter
    Peter avatar
    1148 posts

    Posted 14 Nov 2011 Link to this post

    Hello David,

    TAB key is a special key in WinForms - it is used for navigation between controls.
    To avoid the default WinForms behavior you, should override Form's ProcessCmdKey event and check if Keys.Tab is pressed. Then, you should select next date/time part in the RadMaskedEditBox/RadDateTimePicker. Please refer to the sample code below:

    MaskDateTimeProvider provider =this.radMaskedEditBox1.MaskedEditBoxElement.Provider as MaskDateTimeProvider;

    Take a look at the attached sample project that demonstrates the complete behavior for RadMaskedEditBox and for RadDateTimePicker navigation. 

    I hope this helps.

    the Telerik team

    Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

Back to Top