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

androidMode="spinner" not working #231

Open phzbox opened 6 years ago

phzbox commented 6 years ago

Issue

Setting androidMode="spinner" still shows the calendar mode

Expected Behavior

Should show the spinner version to set the date

Code

    <DatePicker
          mode="date"
          androidMode="spinner"
        />

Environment

  1. react-native -v: 0.54.0
  2. node -v: v8.9.1
  3. npm -v: 4.6.1
  4. yarn --version:
  5. target platform: Android | iOS android
  6. operating system: galaxy s8, android7.0
Saarett commented 6 years ago

For me, while working with:

  1. react-native -v: 0.52.0
  2. node -v: v8.4.0
  3. npm -v: 5.3.0
  4. yarn --version: 1.5.1 target platform: Android | iOS android

It works on Redmi 4A Android 6.0.1 and SAMSUNG-SM-J320A Android 6.0.1, but doesn't work on Galaxy J7 Nxt Android 7.0.

By the way, it also happens on the DatePickerAndroid component of React Native.

Edit: It seems to be a known bug in Android 7.0 that was fixed in 7.1: https://issuetracker.google.com/issues/37120178 https://issuetracker.google.com/issues/37119315

h2soheili commented 4 years ago

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