This is a migrated thread and some comments may be shown as answers.

Using tab to move between sections in a DatePicker

1 Answer 499 Views
MaskedEditBox
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 09 Nov 2011, 05:47 PM
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

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 14 Nov 2011, 04:30 PM
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.

Tags
MaskedEditBox
Asked by
David
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or