set focus on the time part by default?

6 posts, 1 answers
  1. shortie
    shortie avatar
    23 posts
    Member since:
    Jul 2008

    Posted 12 Nov 2009 Link to this post

    Hello,

    Is there any method to achieve this behavior?

    BR/shortie

  2. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 17 Nov 2009 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. shortie
    shortie avatar
    23 posts
    Member since:
    Jul 2008

    Posted 24 Nov 2009 Link to this post

    Hi Boyko,

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

    BR/shortie

  5. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 27 Nov 2009 Link to this post

    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.
  6. rajani
    rajani avatar
    16 posts
    Member since:
    Aug 2010

    Posted 02 Nov 2010 Link to this post

    hi is there any develpoment done to set focus on the datetime picker up on selection? Please reply ASAP.
  7. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 04 Nov 2010 Link to this post

    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
Back to Top
UI for WinForms is Visual Studio 2017 Ready