Version

Using the Last Valid Date in WebDatePicker

WebDatePicker™ provides you with an option to set the last valid date as soon as the control loses focus if the end-user enters an invalid date. You can achieve this by simply setting the control’s UseLastGoodDate to True. By default, this property is set to False.

You can set the UseLastGoodDate property either by using the Microsoft® Visual Studio® Property Window or by using the following code:

In Visual Basic:

WebDatePicker1.UseLastGoodDate = true

In C#:

WebDatePicker1.UseLastGoodDate = true;

In JavaScript:

$find("WebDatePicker1").set_useLastGoodDate(true);