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
640 stars 164 forks source link

Use of DatePickerInput crashes on Android #280

Closed lelimit closed 1 year ago

lelimit commented 1 year ago

Current behaviour

App crashes when loading component using DatePickerInput

Expected behaviour

No crash

How to reproduce?

<DatePickerInput style={styles.input} mode='outlined'
label={startDateLabel} value={startDate} onChange={(d) => { setStartDate(d) }} inputMode='start' withDateFormatInLabel={false}
/>

ERROR ReferenceError: Can't find variable: Intl

Call stack React.useMemo$argument_0 ...\src\Date\dateUtils.tsx

iM-GeeKy commented 1 year ago

See related https://github.com/web-ridge/react-native-paper-dates/issues/213, https://github.com/web-ridge/react-native-paper-dates/issues/184, https://github.com/web-ridge/react-native-paper-dates/issues/153, https://github.com/web-ridge/react-native-paper-dates/issues/246

There are other resolved threads pertaining to this issue here.

Also check out android caveats.

github-actions[bot] commented 1 year ago

Hey! Thanks for opening the issue. Can you provide a minimal repro which demonstrates the issue? Posting a snippet of your code in the issue is useful, but it's not usually straightforward to run. A repro will help us debug the issue faster. Please try to keep the repro as small as possible. The easiest way to provide a repro is on snack.expo.dev. If it's not possible to repro it on snack.expo.dev, then you can also provide the repro in a GitHub repository.

lelimit commented 1 year ago

Thanks. I solved this by changing js engine to hermes