question on dateTimePickerAdv

Syncfusion 4.4

I want the date format like mm/dd/yyyy, and the user can manually enter a date or choose a date from the control.

The following doesn't give me the effect:


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;

Thanks a lot,
Wen

3 Replies

J. J.Nagarajan Syncfusion Team July 31, 2007 10:46 PM UTC

Hi Wen,

Thanks for using Syncfusion product.

You can do this by setting the Format property to Custom and set the CustomFormat as "dd.MM.yyyy".

Here is the code snippet:

this.dateTimePickerAdv1.Format = DateTimePickerFormat.Custom;
this.dateTimePickerAdv1.CustomFormat = "dd.MM.yyyy";
this.dateTimePickerAdv1.Value = DateTime.Now;

Please let me know if this helps you.


Regards,
Nagaraj


J. J.Nagarajan Syncfusion Team July 31, 2007 10:48 PM UTC

Hi Wen,

Thanks for using Syncfusion product.

You can do this by setting the Format property to Custom and set the CustomFormat as "MM/dd/yyy".

Here is the code snippet:

this.dateTimePickerAdv1.Format = DateTimePickerFormat.Custom;
this.dateTimePickerAdv1.CustomFormat = "MM/dd/yyy";
this.dateTimePickerAdv1.Value = DateTime.Now;

Please let me know if this helps you.


Regards,
Nagaraj


WJ Wen Jiang August 1, 2007 03:50 PM UTC

Thank you Nagarajan. Your reply is helpful.

Wen

>Hi Wen,

Thanks for using Syncfusion product.

You can do this by setting the Format property to Custom and set the CustomFormat as "MM/dd/yyy".

Here is the code snippet:

this.dateTimePickerAdv1.Format = DateTimePickerFormat.Custom;
this.dateTimePickerAdv1.CustomFormat = "MM/dd/yyy";
this.dateTimePickerAdv1.Value = DateTime.Now;

Please let me know if this helps you.


Regards,
Nagaraj

Loader.
Up arrow icon