I’ve a DateTimePicker control in my code. And I have used a custom format.
this.dateTimePickerDate.CustomFormat = "dd/MM/yyyy";
this.dateTimePickerDate.Value = System.DateTime.Now;
Now the requirement is to focus on the date part of the control. For example if this control shows 30/06/2011, after the form_load, then 30 from the date part should be selected or the cursor will be after the 0 in 30.
Thanks in advance.
Maybe this code helps:
And on form load set focus to datetimepicker.