Open zhenguet opened 1 year ago
having the same issue
Me too
Have you tried the Android imperative API? I'm using this w/ RN 0.71.6
/Expo 48.0.11
and it appears to be working fine? The version I'm using is 6.7.3
(installed via npx expo install @react-native-community/datetimepicker
)
Same issue
Any resolution on this
Have you tried the Android imperative API? I'm using this w/ RN
0.71.6
/Expo48.0.11
and it appears to be working fine? The version I'm using is6.7.3
(installed vianpx expo install @react-native-community/datetimepicker
)
Hey @Drew-Gerber , I'm using exact same versions and in my code looks like this:
const onPress = () => {
DateTimePickerAndroid.open({ value: new Date() });
};
<PrimaryButton onPress={onPress}>
<Text>Datetime picker</Text>
</PrimaryButton>
But it doesnt show up, any suggestions?
My @react-native-community/datetimepicker version is 3.5.2 & react-native-modal-datetime-picker version is 15.0.1. Using the pickerComponentStyleIOS property, I was able to resolve this issue. I give height in pickerComponentStyleIOS and It worked for me.
Same issue with my RN version 0.69
My @react-native-community/datetimepicker version is 3.5.2 & react-native-modal-datetime-picker version is 15.0.1. Using the pickerComponentStyleIOS property, I was able to resolve this issue. I give height in pickerComponentStyleIOS and It worked for me.
After setting the height like @jaiminbhut suggested the picker on iOS 14 is working again.
pickerComponentStyleIOS={{height: 300}}
"@react-native-community/datetimepicker": "7.4.2" "react-native": "0.69.9"
@Buk1m , I am unable to see, the date picker in my android device. It shows DatePickerAndroid is depreciated, any suggestions?
I followed the FAQ of react-native-modal-datetime-picker
and updated @react-native-community/datetimepicker
to latest version but it didn't help and after that I had errors on Android.
I went back to the version recommended by expo:
"@react-native-community/datetimepicker": "6.5.2"
and used the suggested prop:
pickerComponentStyleIOS={{height: 300}}
Now I have a working picker on both platforms, but so far I only tested it on simulators.
@Buk1m Thank You your fixes is working
facing same issue
I'm having a similar issue where the actual picker isnt rendering on an actual device but its showing in my simulator.
"@react-native-community/datetimepicker": "7.2.0",
"expo": "~49.0.15",
"react-native": "0.72.6",
but im not using react-native-modal-datetime-picker, has anyone else been having this issue?
<DateTimePicker
mode='date'
display='spinner'
value={field.value.toDate()}
onChange={(_, date) => {
date && field.onChange(dayjs(date))
/// We need to close for android
Platform.OS === 'android' && setOpen(!open)
}}
/>
Bug report
Environment
Platforms
Android
Versions
Description
set visible to true but modal do not show
Reproducible Demo