added error message when invalid date entered