Prasad Godbole

Prasad Godbole

  • NA
  • 153
  • 170.6k

How to move focus on date part of DateTimePicker ?

May 22 2012 2:33 AM
Hi All,

We are working on the windows application. Just for example we have following 3 fields and controls on the form

1) User Name - TextBox

2) Start Date - DateTimePicker

3) End Date - DateTimePicker

We have added tabbing on it and its working.

Tabbing sequence is in the following order

User Name
Start Date
End Date


In the DateTimePicker we are showing date in following format

29 May 2012


When we press tab key first we get focus on "User Name" and then on "Start Date" DateTimePicker i.e. on the date part of "Start Date" now again we press tab key and focus moves to date part of "End Date" DateTimePicker. This is the tabbing cycle.

Now again we continue to press tab key and get focus on "Start Date" DateTimePicker. At this stage if we press right arrow key then month part of "Start Date" DateTimePicker get selected. If we again press tab key then focus moves to date part of "End Date" DateTimePicker.

If we continue to press tab key then focus gets on month part of "Start Date" DateTimePicker instead of date part of it. We want that user should always get the focus on date part of DateTimePicker.

Please help us if anyone knows the solution for this.


Thanks and Regards
Prasad