DateTimePicker Highlight content on enter

2 posts, 0 answers
  1. Mark
    Mark avatar
    79 posts
    Member since:
    Oct 2014

    Posted 19 Jul 2017 Link to this post

    I have not found how to select the entire content of a DateTimePicker when it get's focus (OnEnter).  I have done this with a MaskedEditBox, but can't seem to get it to work with this control. Any help would be greatly appreciated.



  2. Dimitar
    Dimitar avatar
    2109 posts

    Posted 20 Jul 2017 Link to this post

    Hello Mark,

    Thank you for writing.

    If you are selecting with the mouse you need to use the MouseUp event to select the text:
    public Form1()
        this.radDateTimePicker1.DateTimePickerElement.TextBoxElement.TextBoxItem.MouseUp += TextBoxItem_MouseUp;
    private void TextBoxItem_MouseUp(object sender, MouseEventArgs e)
    private void RadDateTimePicker1_GotFocus(object sender, EventArgs e)

    I hope this will be useful. Let me know if you have additional questions.

    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top