This is a migrated thread and some comments may be shown as answers.
DateTimePicker selection
2 Answers 14 Views
This is a migrated thread and some comments may be shown as answers.
Vladimir
Top achievements
Rank 1
Vladimir asked on 05 May 2017, 03:26 PM
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 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 09 May 2017, 12:04 PM
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.
0
Vladimir
Top achievements
Rank 1
answered on 10 May 2017, 10:21 AM
Thank you. Added this to radDateTimePicker1.DateTimePickerElement.TextBoxElement.MouseDown event.
Asked by
Vladimir
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Vladimir
Top achievements
Rank 1
Share this question
or