xgfe / react-native-datepicker

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

androidMode not (yet) working? #110

Open anceque opened 7 years ago

anceque commented 7 years ago

Hey, i wanted to test the new feature for androidMode='spinner', added today, but it seems it's not working for me because the calendar view is shown..

my code is rather simple and here's a snippet from it:

<DatePicker
    date={this.props.birthDate}
    mode='date'
    androidMode='spinner'
    format='YYYY-MM-DD'
/>

Am i doing something wrong?

inferno1005 commented 7 years ago

You are not doing anything wrong, there was a small mistake in the latest build. I have created a pull request that fixes the problem. #111

Proberts commented 7 years ago

I've got this same issue even with the PR applied (RN 0.39.1) @inferno1005 Were you able to get a spinner on Android for date? If so, which version of RN are you using? I'm thinking my issue is because of https://github.com/facebook/react-native/issues/11727

inferno1005 commented 7 years ago

Yes I am able to get the spinner to work with the mode='date' androidMode='spinner' We are using React Native 0.42.2 also android version is 6.0.1 if that matters.

anceque commented 7 years ago

@inferno1005 Can you, please, make it work also with mode='datetime'?

univers3 commented 7 years ago

On Android 7.0 I just set mode='date' androidMode='spinner'. The Calendar keeps showing up every time. Someone knows why? This is the code:

<DatePicker
    showIcon={false}
    style={{width: 110}}
    date={this.state.date}
    mode='date'
    placeholder="Clicca qui"
    format="DD/MM/YYYY"
    minDate="14/04/1900"
    maxDate={today}
    confirmBtnText="Confirm"
    cancelBtnText="Cancel"
    customStyles={{
      dateIcon: {
        position: 'absolute',
        left: 0,
        top: 4,
        marginLeft: 0
      }
    }}
    onDateChange={(date) => {this.setState({date: date})}}
    androidMode='spinner'
/>

Thanks!

quintonn commented 7 years ago

I have same issue on Android 7. Seeing calendar and no spinner. Only on Android 7's.

rwrz commented 7 years ago

@quintonn same here!

lucidtheory commented 7 years ago

same here

iddan commented 6 years ago

https://stackoverflow.com/questions/39873076/datepickerdialog-holo-styling-failed-on-android-7-nougat @EsdrasEtrenne @rwrz @quintonn @univers3

h2soheili commented 5 years ago

Duplicate of https://github.com/xgfe/react-native-datepicker/issues/315