Open rdewolff opened 5 years ago
+1 to submitting on mask press (I think that's what you mean?)
My workaround for now is using the (undocumented) onPressConfirm
:
class MyDatePicker {
_onPress() {
const {onPressMask} = this.props;
this._datePickerRef.onPressConfirm();
if (onPressMask) {
onPressMask();
}
}
_onDatePickerRef(ref) {
this._datePickerRef = ref;
}
render() {
<DatePicker {...this.props} ref={this._onDatePickerRef} onPress={this._onPress} />
}
}
@izhan @rdewolff - this PR adds support for exactly this! https://github.com/xgfe/react-native-datepicker/pull/363
How can we validate the input when the mask is clicked?
I noticed many user wanting to validate the input by simply clicking on the mask and not on the OK button.
What do you think? How can we achieve that?