Check for valid date when searching date field