added error validation to date-selector