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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DateTimePickerAdv question

Thread ID:





62154 Jun 8,2007 02:23 PM UTC Jun 9,2007 12:28 AM UTC WinForms 1
Tags: Tools
Kamen Yotov
Asked On June 8, 2007 02:23 PM UTC

In DateTimePickerAdv, one can use the arrow keys to go through the fields (Left+Right) and change them (Up+Down).

When I am on the date field, I want to move to the month (next field) if a letter is pressed, as this is most likely what the user means (he/she wants to type in the month, after typing in the date).

I am using CustomFormat, "dd MMM yyyy".

Is there a way to programatically check which field is one on and to move to a specific other field?

Murugan [Syncfusion]
Replied On June 9, 2007 12:28 AM UTC

Hi Kamen,

This could be achieved by customizing the DateTimePickerAdv control and overriding the ProcessCmdKey method

public class CustomDTPA : DateTimePickerAdv

public CustomDTPA(): base()
this.Format = DateTimePickerFormat.Custom;
this.CustomFormat = "dd mm yyyy";

protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
if (keyData == Keys.A)
keyData = Keys.Right;
return base.ProcessCmdKey(ref msg, keyData);

Please refer to the code snippet above and let me know if it helps you.

Thank you for your interest in Syncfusion products.

Murugan P.S


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon