Basic Date Picker Documentation

BasicDatePicker.IsNull Property

Gets a value indicating whether the SelectedDate is [Null]. There is no DateTime Null value in .NET, so DateTime.MinValue is returned to represent [Null].

[Visual Basic]
Overrides Public ReadOnly Property IsNull As Boolean
public override bool IsNull {get;}

Property Value

Is the SelectedDate DateTime.MinValue (Null).


The DateTime object is a value type and can not be null. BasicDatePicker uses DateTime.MinValue to represent a Null DateTime.


The IsNull property allows for easy checking of empty dates.

 if (!BasicDatePicker1.IsNull && this.BasicDatePicker1.IsDate)

If you are using a DataReader, using the IsDBNull method simplifies setting the SelectedDate.

 this.BasicDatePicker1.SelectedDate = myReader.IsDBNull(0) ? DateTime.MinValue : myReader.GetDateTime(0)
 //<--- 0 is the column in the DataReader.

See Also

BasicDatePicker Class | BasicFrame.WebControls Namespace | IsDate | DateTime.MinValue