xgfe / react-native-datepicker

react native datePicker component for both Android and IOS, useing DatePikcerAndroid, TimePickerAndroid and DatePickerIOS
MIT License
2.12k stars 726 forks source link

datetime mode is not working in android #423

Open Deep1210 opened 4 years ago

Deep1210 commented 4 years ago

Issue

In Android datetime mode is not working any solution for this

Expected Behavior

Code

<DatePicker style={{ flex: 1 }} date={this.state.pickDate} mode="datetime" placeholder="Pickup Date" format="YYYY-MM-DD HH:mm" minDate={d1} showIcon={false} confirmBtnText="Confirm" cancelBtnText="Cancel" customStyles={{ dateInput: { marginRight: 10, marginLeft: 10, marginTop: 5, marginBottom: 5, borderColor: 'transparent', borderWidth: 1,

                                            }
                                            // ... You can check the source to find the other keys.
                                        }}
                                        onDateChange={(date) => { this.setState({ pickDate: date }) }}
                                    />

Environment

  1. react-native -v:
  2. node -v:
  3. npm -v:
  4. yarn --version:
  5. target platform: Android | iOS
  6. operating system:
brenu commented 4 years ago

At the present moment, datetime mode is available only for iOS. That's why it doesn't work on your android device.

fjjwade commented 3 years ago

/**

mehrankhandev commented 3 years ago

if you still using this library like me and need "datetime" support i have forked the library . please try this https://github.com/mehrankhandev/react-native-datepicker

Note: you have to install @react-native-community/datetimepicker first