Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Editors (TextBox, MaskedEdit, SpinEditor, BrowseEditor, ColorBox) > Using tab to move between sections in a DatePicker

Not answered Using tab to move between sections in a DatePicker

Feed from this thread
  • David avatar

    Posted on Nov 9, 2011 (permalink)

    Ok, so our client wants to type in dates...no 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?

    Thanks,
    David

    Reply

  • Peter Peter admin's avatar

    Posted on Nov 14, 2011 (permalink)

    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;
    provider.SelectNextEditableItem();

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

    I hope this helps.

    Regards,
    Peter
    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.

    Attached files

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Editors (TextBox, MaskedEdit, SpinEditor, BrowseEditor, ColorBox) > Using tab to move between sections in a DatePicker
Related resources for "Using tab to move between sections in a DatePicker"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]