DatetimePickerAdv - Editing Over Null Text
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
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
Regards,
Thanks a lot for help!
Hi JackyYanger,
Regards,
Bagavathi Perumal A
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..
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
Thanks a lot!
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
- 11 Replies
- 11 Participants
-
TA Tom Affholter
- May 16, 2007 05:58 PM UTC
- Dec 22, 2023 05:06 AM UTC