DateTimePicker selection

3 posts, 0 answers
  1. Vladimir
    Vladimir avatar
    2 posts
    Member since:
    Sep 2016

    Posted 05 May 2017 Link to this post

    Currently if you select the control by clicking on it - it makes active editable part of the date exactly where you clicked (for ex. yyyy part of the mm/dd/yyyy date). Users want to have selection  to be always in the start of the date not tied to place where they clicked . How could be selection be moved to the first part of the date (mm part in our case)?
  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    2816 posts

    Posted 09 May 2017 Link to this post

    Hello Vladimir, 

    Thank you for writing.  

    Here is a sample code snippet demonstrated how to select the first editable part in RadDateTimePicker:
    public RadForm1()
    {
        InitializeComponent();
     
        this.radDateTimePicker1.Format = DateTimePickerFormat.Custom;
        this.radDateTimePicker1.CustomFormat = "dd/MM/yyyy";
    }
     
    private void RadForm1_Load(object sender, EventArgs e)
    {
        MaskDateTimeProvider provider = this.radDateTimePicker1.DateTimePickerElement.TextBoxElement.Provider as MaskDateTimeProvider;
        provider.SelectFirstEditableItem();
    }

    I hope this information helps. Should you have further questions I would be glad to help.

    Regards,
    Dess
    Telerik by Progress
    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.
  3. Vladimir
    Vladimir avatar
    2 posts
    Member since:
    Sep 2016

    Posted 10 May 2017 Link to this post

    Thank you. Added this to radDateTimePicker1.DateTimePickerElement.TextBoxElement.MouseDown event.
Back to Top