web-ridge / react-native-paper-dates

Smooth and fast cross platform Material Design date and time picker for React Native Paper
https://www.reactnativepaperdates.com
MIT License
642 stars 166 forks source link

Date input props #229

Closed iM-GeeKy closed 1 year ago

iM-GeeKy commented 1 year ago

Motivation

The DatePickerInput does not give the flexibility to roll out your own validation (ex. if a user selected date of birth is older than 18 years) which could result in two helperText errors being shown under the DatePickerInput.

This PR introduces a few new props hideValidationErrors, hasError, and onValidationError, etc in order to provide the ability to ingest the internal validation errors from the component, hide the components error styles, and give the developer the option of rolling out there own validation.

The developer docs are updated as well to have all the new props along with some other missing props.