React-native-modal-datetime-picker: Dark mode picker showing blank in iOS 14.

Created on 26 Sep 2020  路  5Comments  路  Source: mmazzarolo/react-native-modal-datetime-picker

## Description
In Dark mode only showing cancel and confirm button calendar and date not showing but working when scroll.

Platforms

iOS

Versions

  • iOS:
  • react-native-modal-datetime-picker 9.0.0

IMG_2349

bug

Most helpful comment

The @shkavro solution is right.

@Canser You may have a app.json file. It is the same thing:

{
  "expo": {
    "name": "Project",
    "slug": "project",
    "privacy": "unlisted",
    "platforms": ["ios", "android", "web"],
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "userInterfaceStyle": "automatic",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": ["**/*"],
    "ios": {
      "supportsTablet": true
    },
    "android": {
      "icon": "./assets/icon.android.png"
    }
  }
}

All 5 comments

Dark-mode is supported out of the box. Make sure you're using the latest version of react-native-modal-datetime-picker and of the community picker. If it still doesn't work, please follow the issue template in its entirety and create a reproducible repo example 馃憤 Thanks!

@ketanpatel3377 I've fixed the issue with setting up userInterfaceStyle: 'automatic' in app.config.js.

I am not using expo hence I do not have an app.config.js file. Re-installed new versions of both packages but did not work.

Do you know how can we fix this?

The @shkavro solution is right.

@Canser You may have a app.json file. It is the same thing:

{
  "expo": {
    "name": "Project",
    "slug": "project",
    "privacy": "unlisted",
    "platforms": ["ios", "android", "web"],
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "userInterfaceStyle": "automatic",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": ["**/*"],
    "ios": {
      "supportsTablet": true
    },
    "android": {
      "icon": "./assets/icon.android.png"
    }
  }
}

I just run into this problem and @soullivaneuh 's solution worked perfectly. Thanks!

Was this page helpful?
0 / 5 - 0 ratings