We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

DateTimePickerAdv control

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?

4 Replies

AD Administrator Syncfusion Team August 23, 2004 04:16 PM UTC

Hi Marju, Thanks for bringing this issue to our attention. I have tested for this in our latest release - v2.1.0.9 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. Regards, Guru Patwal Syncfusion, Inc.


MM Marju Makinen August 23, 2004 05:59 PM UTC

Do you have a work around for this until the issue is resolved?


AD Administrator Syncfusion Team August 24, 2004 01:44 PM UTC

Hi Marju, The above mentioned issue in v2.1.0.9 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. Regards, Guru Patwal Syncfusion, Inc.


MM Marju Makinen August 27, 2004 09:33 PM UTC

Yes, the workaround worked. Thank you, Marju.

Loader.
Up arrow icon