React Native DateTimePicker not Opening in IOS

<DatePicker
iOSDatePickerComponent={(props) => (
                              <RNDatePicker
                                {...props}
                                display={
                                  Platform.OS === "ios" ? "spinner" : "default"
                                }
                              />
                            )} ..../>

just add this in your datePicker component will work fine ;)


I just move to react-native-modal-datetime-picker its working fine now


I had the same problem as of June 26, 2020, with this version: "@react-native-community/datetimepicker": "2.2.2".

I just added style with width and the datetimepicker displayed in iOS:

style={{width: 320, backgroundColor: "white"}}

I also added backgroundColor so that it becomes opaque white.

Here is my code:

<DateTimePicker
    value={user.birthdate ? new Date(user.birthdate) : new Date()}
    mode='date'
    display="default"
    onChange={(event, date) => {
       //...some code here
       setBirthdateTouched(true);
       setModalVisible(!modalVisible);
    }}
    style={{width: 320, backgroundColor: "white"}} //add this

/>

Enjoy coding!