Validating entered dates

I’m using the grid control and allowing users to type in a date, but if they enter an alpha character by accident, the date goes blank. Is there a way to check the validity of a date after the user selects “Update” and let them know if something is wrong with it?
I’m using this to establish the date before storing it to the database, but I want to know if the date is actually valid first:

	$shipDate = new DateTime($_POST[$rowId."_c1"]);
	$shipDateFormatted = $shipDate->format('Y-m-d');

You may use the validation with the required method in your grid:
docs.dhtmlx.com/dataprocessor__ … validation

Please, try to use something like the following:
function val_date(value){
if (value.match(/^(?:(19|20)[0-9]{2}- /.- /.)$/)){
return true;
}else{
return false;
}
}
myDataProcessor.setVerificator(column_index,val_date);

Here you can find an example of usage of the dataprocessor validation:
dhtmlx.com/docs/products/dhtmlx … ation.html