Basic Date Picker Documentation

BDPLite.IsDate Property

Gets a value indicating whether the posted text can be parsed into a valid DateTime object. If the text value can not be parsed into a DateTime object based on the DateFormat, then false is returned.

[Visual Basic]
Public ReadOnly Property IsDate As Boolean
[C#]
public bool IsDate {get;}

Property Value

false if the text supplied can not be parsed into a valid DateTime object, otherwise true.

Remarks

Use the IsDate to determine if value supplied in TextBox could be converted into a valid DateTime object. If the TextBox value could not be parsed into a DateTime object, IsDate will be false.

Note   See IsDate for more information.

Example

Easily check to ensure date supplied is valid. Example:

 
 if (BDPLite1.IsDate && !BDPLite1.IsNull)
        Response.Write("Valid Date");
    else
        Response.Write("Invalid Date");

See Also

BDPLite Class | BasicFrame.WebControls Namespace