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

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.

Thanks,

Tom

11 Replies

MU Murugan Syncfusion Team 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.

[Code]
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;

[Sample]
http://websamples.syncfusion.com/samples/Tools.Windows/F61014/Main.htm

Please refer to this sample and let me know if it helps you.

Thank you for your interest in Syncfusion products.

Regards,
Murugan P.S


MR marie rogers March 17, 2020 07:26 AM UTC

The DateTimePicker control is part of a group of ActiveX controls so you should be looking for the Mscomct2.ocx file for users to be able select a date from a drop-down calendar interface. fast essay writing service
 


UN Unknown Syncfusion Team March 19, 2020 06:09 AM UTC

Hi Marie, 

Thanks for your update.

Regards, 
Niranjan Kumar 




AS Amos Smith April 30, 2020 08:17 PM UTC

I need to find more information about DateTimePicker, because I'm preparing a written work on this topic and I need to do it properly. I want to know your experience and tips about it. I already looked at examples of guys on this topic https://gradesfixer.com/free-essay-examples/religion/ but there are still questions, for me, all this pretty hard!
I'll be very grateful for any recommendations.
Amos


UN Unknown Syncfusion Team May 1, 2020 05:34 AM UTC

Hi Amos, 

Thanks for contacting Syncfusion support. 

We have checked your query and shared you find the below documentation for our DateTimePickerAdv (Classic control) and SfDateTimeEdit(Advanced control). In the below documentation , you can find the detailed explanation of the above mentioned controls functions and properties. 



Regards, 
Niranjan Kumar Gopalan 



JA JackyYanger September 14, 2022 10:49 AM UTC

Thanks a lot for help!



BA BagavathiPerumal Apranandham Syncfusion Team September 16, 2022 03:17 PM UTC

Hi JackyYanger,


We hope that your issue is resolved. Please let us know if you need any other assistance. We are happy to assist you.



Regards,
Bagavathi Perumal A



SI singh November 4, 2022 03:50 AM UTC

I am using  SfDateTimeEdit1 AllowNull. and 

 SfDateTimeEdit1.Value = Nothing

Now when i try to edit the null value... value is not editable.

is there NullModeKeyReset in sfdatetimeedit control..




HN Harinath Navaneethakrishnan Syncfusion Team November 9, 2022 12:23 PM UTC

Hi singh,


We are able to edit the datetimeedit value when it is null with NumericKeys using the keyboard. Please refer to the sample and the video from the attachment for your reference.

Currently, there is no support like NullModeKeyReset in DateTimePickerAdv. Could you please elaborate your requirement that you want to meet? based on that we will try to provide a solution with existing API or we will consider it as a feature request.




Attachment: SfDateTimeEdit2_25cda851.zip


JJ Jack Jones December 20, 2023 07:50 PM UTC

Thanks a lot!



BS Bhaskar Suresh Syncfusion Team December 22, 2023 05:06 AM UTC

Hi,


We hope that your issue has been fixed. Please let us know if you need any other assistance. We are happy to assist you.


Regards,

Bhaskar Suresh


Loader.
Live Chat Icon For mobile
Up arrow icon