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

set focus on the time part by default?

5 Answers 155 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
shortie
Top achievements
Rank 2
shortie asked on 12 Nov 2009, 07:56 AM
Hello,

Is there any method to achieve this behavior?

BR/shortie

5 Answers, 1 is accepted

Sort by
0
Boyko Markov
Telerik team
answered on 17 Nov 2009, 04:42 PM
Hello ChunChang,

We do not currently support this feature and it cannot be done by code. You will have to click manually in the time-part to focus it. However, we will do our best to improve the control's API for the future releases. 
This will allow you to set the focus to different parts of the date.

Kind regards,
Boyko Markov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
shortie
Top achievements
Rank 2
answered on 25 Nov 2009, 01:09 AM
Hi Boyko,

Then we would like to suggest you provide this function ASAP. :)

BR/shortie

0
Boyko Markov
Telerik team
answered on 27 Nov 2009, 09:22 AM
Hi ChunChang,

Thank you for the suggestion. We will do our best to provide the feature for the next major release of RadControls for Winforms.

In case you have more questions, please feel free to write us.

Best wishes,
Boyko Markov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
rajani
Top achievements
Rank 1
answered on 02 Nov 2010, 01:02 PM
hi is there any develpoment done to set focus on the datetime picker up on selection? Please reply ASAP.
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 04 Nov 2010, 12:59 PM
Hi Rajani, 

You can set the focus to the part that you wish by using SendKeys. (I tried getting the underlying RadMaskTextBox and setting the SelectionStart and SelectionLength, but this doesn't seem to have the desired effect)

The following exmaple should work for you. 
Me.RadDateTimePicker1.Focus()
Me.RadDateTimePicker1.ShowUpDown = True
Me.RadDateTimePicker1.Format = DateTimePickerFormat.Custom
Me.RadDateTimePicker1.CustomFormat = "mm/dd/yyyy hh:mm:ss"
SendKeys.Send("{RIGHT}") 'place to month
SendKeys.Send("{RIGHT}") 'place to year
SendKeys.Send("{RIGHT}") 'place to hour

hope that helps
Richard
Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
shortie
Top achievements
Rank 2
Answers by
Boyko Markov
Telerik team
shortie
Top achievements
Rank 2
rajani
Top achievements
Rank 1
Richard Slade
Top achievements
Rank 2
Share this question
or