I’m using the DateTimePickerAdv control and the problem I’m having with this control is the selection of the month, day or year part of the date in the control.
When I first open the form and set the value of the control to today’s date and set the focus to the field, the month part of the date is selected for editing.
Then I move the cursor to the year part of the date and then leave the control.
When I tab or set the focus back to the control the year part of the date is still selected. This is true even if I have changed the value of the date field in the code to a different date.
I would prefer that every time I tab or set the focus to the DateTimePickerAdv control month would be the selected part of the date (as it is when I first open the form).
How can I do this in the code?
ADAdministrator Syncfusion Team August 23, 2004 11:16 AM
Thanks for bringing this issue to our attention. I have tested for this in our latest release - v18.104.22.168 and see that none of the fields in the DateTimePickerAdv get selected for editing when the DateTimePickerAdv receives focus (except when the application is loaded initially). Please refer to the test sample attached here. I have notified the development team about this issue and we will try our best to address this at the earliest. We appreciate your patience and thanks for your feedback.
MMMarju MakinenAugust 23, 2004 12:59 PM
Do you have a work around for this until the issue is resolved?
ADAdministrator Syncfusion Team August 24, 2004 08:44 AM
The above mentioned issue in v22.214.171.124 was a bug which has now been taken care of internally, and the fixes will be available in the next release of Essential Suite.
For now, a workaround here would be to handle the DateTimePickerAdv''s GotFocus event as shown below :
this.dateTimePickerAdv1.GotFocus += new EventHandler(DateTimePickerAdv_GotFocus);
private void DateTimePickerAdv_GotFocus (object sender, EventArgs args)
this.dateTimePickerAdv1.Format = DateTimePickerFormat.Long;
this.dateTimePickerAdv1.Format = DateTimePickerFormat.Short;
Please refer to the modified sample attached here that illustrates this workaround, and let me know if this works for you. Thanks for your feedback.