)
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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set null value to WinForms DateTimePicker (DateTimePickerAdv)?

Platform: WinForms |
Control: DateTimePickerAdv |
Published Date: April 30, 2011 |
Last Revised Date: November 15, 2019

Null value

Refer to the following code sample for setting null value to DateTimePickerAdv.

C#

this.dateTimePickerAdv1.IsNullDate = true;
//Another way
this.dateTimePickerAdv1.BindableValue = null;
//To clear text
this.dateTimePickerAdv1.NullString = "";

 

VB

Me.dateTimePickerAdv1.IsNullDate = True
'Another way
Me.dateTimePickerAdv1.BindableValue = Nothing
'To clear text
Me.dateTimePickerAdv1.NullString = ""

 

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment
Comments
Frank Piplak
Oct 08, 2014
vb: Êrror when using '.BindableValue = vbNull' and when using '.IsNullDate = True' text 'no date selected' shows Reply
Saravanan Thirunavukkarasu [Syncfusion]
Oct 13, 2014
Hi Frank, Sorry for the inconvenience caused, We have modified the reported code lines and also we suggest you to use IsNullDate property to clear the text in DateTimePickerAdv. Please use the below modified code snippet to set the null date in DateTimePickerAdv. Code Snippet [VB]: Me.dateTimePickerAdv1.IsNullDate = True Me.dateTimePickerAdv1.NullString = "" 'Another way Me.dateTimePickerAdv1.BindableValue = Nothing We have prepared a sample to achieve your requirement and it is available in below link. Link: http://www.syncfusion.com/downloads/support/directtrac/general/DateTimePickerAdv-1179293279.zip Please let us know if you need any further assistance, Regards, Saravanan T

Please sign in to access our KB

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

Up arrow icon

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

Live Chat Icon For mobile
Live Chat Icon