We have a page with a number of DatePickers and a submit button.
The DatePickers must contain a valid date, or they can be blank.
When a user enters an invalid date into a DatePicker field, and then switches focus to another field the DatePicker displays its contents in red, and adds a little "!" icon.
If the user clicks on the submit button while a DatePicker fields contains an invalid date, how do I tell in the code-behind that a DatePicker field contains invalid data? In this case, SelectedDate is null, but SelectedDate is null if the field is blank, so that's no help.
I need to be able to distinguish between whether a DateField is empty or whether it contains an invalid value, from the server side, and I can see no way of doing so.
The DatePickers must contain a valid date, or they can be blank.
When a user enters an invalid date into a DatePicker field, and then switches focus to another field the DatePicker displays its contents in red, and adds a little "!" icon.
If the user clicks on the submit button while a DatePicker fields contains an invalid date, how do I tell in the code-behind that a DatePicker field contains invalid data? In this case, SelectedDate is null, but SelectedDate is null if the field is blank, so that's no help.
I need to be able to distinguish between whether a DateField is empty or whether it contains an invalid value, from the server side, and I can see no way of doing so.