henninghall / react-native-date-picker

React Native Date Picker is datetime picker for Android and iOS. It includes date, time and datetime picker modes. The datepicker is customizable and is supporting different languages. It's written with native code to achieve the best possible look, feel and performance.
MIT License
2.21k stars 338 forks source link

crash onCancel #826

Closed looweex closed 4 months ago

looweex commented 4 months ago

use the datepicker as below <DatePicker modal mode="time" open={show} date={date} theme="dark" onConfirm={(date) => { setShow(false) setDate(date) }} onCancel={() => { setShow(false) }} />

when i click Cancel button, there is an error

<img width="410" alt="" src="https://github.com/henninghall/react-native-date-picker/assets/47051545/36bf4e0c-f0e9-4a20-82cf-194993b94b03"

my env info: System: OS: macOS 14.1.2 CPU: (12) arm64 Apple M2 Max Memory: 314.64 MB / 32.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 21.7.3 path: /opt/homebrew/bin/node Yarn: version: 1.22.21 path: /opt/homebrew/bin/yarn npm: version: 10.5.0 path: /opt/homebrew/bin/npm Watchman: version: 2024.04.15.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.15.2 path: /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms:

henninghall commented 4 months ago

Thanks for the PR @rajdevkar, the fix is released in version 5.0.4