fixed validation for date picker