Environment
- react-native-modal-datetime-picker: 18.0.0
- @react-native-community/datetimepicker: (latest)
- Expo SDK: 56
- React Native: 0.79
- Platform: Android & iOS
Description
When using react-native-modal-datetime-picker with the standard onConfirm and onCancel props, the following warning appears in the console:
WARN DateTimePicker: onChange is deprecated. Use onValueChange, onDismiss, and onNeutralButtonPress instead.
The warning comes from inside the library itself — not from user code. The underlying @react-native-community/datetimepicker deprecated onChange in favor of onValueChange, onDismiss, and onNeutralButtonPress, but react-native-modal-datetime-picker still uses onChange internally.
Expected behavior
No deprecation warning when using the library normally.
Possible fix
Replace the internal usage of onChange with onValueChange + onDismiss in the wrapper component.
Environment
Description
When using
react-native-modal-datetime-pickerwith the standardonConfirmandonCancelprops, the following warning appears in the console:WARN DateTimePicker: onChange is deprecated. Use onValueChange, onDismiss, and onNeutralButtonPress instead.The warning comes from inside the library itself — not from user code. The underlying
@react-native-community/datetimepickerdeprecatedonChangein favor ofonValueChange,onDismiss, andonNeutralButtonPress, butreact-native-modal-datetime-pickerstill usesonChangeinternally.Expected behavior
No deprecation warning when using the library normally.
Possible fix
Replace the internal usage of
onChangewithonValueChange+onDismissin the wrapper component.