added validation to timepicker