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 - Editing Over Null Text

Thread ID:





61014 May 16,2007 05:58 PM UTC May 17,2007 11:46 PM UTC WinForms 1
Tags: Tools
Tom Affholter
Asked On May 16, 2007 05:58 PM UTC

My students and I have been studying the datetimePickerAdv. Is there a way to make it more like the FoxPro/dBase (dbx) date control? My students are working on an app that manages our college’s apprentices. The app they gave us to “upsize” was originally developed in Visual FoxPro. Although I do not think it a major problem, the student’s client does. FoxPro dates are/were entered 020207 = 02/02/2007 or 2/2/07 = 02/02/07. It did not have a calendar sub-control. But FoxPro identified null dates as " / / ". To enter a date you were in edit mode immediately.

With the current control, we enter default null text such as "no date". I can simulate " / / ", but the user cannot edit directly without some programmatic intervention. Can we make it such that the user can type over the null text? We added a hotkey (ENTER) that changed the null to today’s date and positioned the cursor in the first field. Still, the users want the older method.

Any suggestions? If not, this might be a nice future feature.



Murugan [Syncfusion]
Replied On May 17, 2007 11:46 PM UTC

Hi Tom,

This could be achieved by setting NullString and NullModeKeyReset property of the DateTimePickerAdv control. NullString property assigns some test representation for null value. NullModeKeyReset property assigns reset key to preset null values. That is it enables us to enter value to the DateTimePickerAdv. One more property CustomFormat enables us to enter date time values as per our wish. AutoForwarding forwards the key to Day, Month and Year fields automatically.

this.dateTimePickerAdv1.IsNullDate = true;
this.dateTimePickerAdv1.NullModeKeyReset = Syncfusion.Windows.Forms.Tools.NullModeKeyReset.NumericKeys;
this.dateTimePickerAdv1.NullString = " / /";
this.dateTimePickerAdv1.CustomFormat = "dd/MM/yyyy";
this.dateTimePickerAdv1.AutoForwarding = true;


Please refer to this sample 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

or the page will be automatically redirected to 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