datetimepicker icon indicating copy to clipboard operation
datetimepicker copied to clipboard

React 19

Open as169m opened this issue 7 months ago • 14 comments

Feature request

Doesnt support react 19?

Why it is needed

This is needed so that we can use it with latest features in react

as169m avatar May 03 '25 07:05 as169m

This is pretty much blocking me @as169m

insertmike avatar May 03 '25 11:05 insertmike

this blocks me to upgrade expo

SaimumIslam avatar May 05 '25 08:05 SaimumIslam

điều này ngăn cản tôi nâng cấp expo

+1 I can't upgrade expo either

huybui21 avatar May 05 '25 10:05 huybui21

Same here. Getting the following error on updating from expo 52 to 53:

'Log files:
/Users/brandtnewlabs/.npm/_logs/2025-05-05T17_32_47_007Z-debug-0.log

# npm resolution error report

While resolving: [email protected]
Found: @react-native-community/[email protected]
node_modules/@react-native-community/datetimepicker
  @react-native-community/datetimepicker@"8.3.0" from the root project

Could not resolve dependency:
@react-native-community/datetimepicker@"8.3.0" from the root project

Conflicting peer dependency: [email protected]
node_modules/react
  peer react@"^19.0.0" from [email protected]
  node_modules/react-native
    react-native@"0.79.2" from the root project
    peer react-native@"*" from @react-native-community/[email protected]
    node_modules/@react-native-community/datetimepicker
      @react-native-community/datetimepicker@"8.3.0" from the root project
    peer react-native@"*" from [email protected]
    node_modules/expo
      expo@"^53.0.0" from the root project
      peerOptional expo@">=50.0.0" from @react-native-community/[email protected]
      node_modules/@react-native-community/datetimepicker
        @react-native-community/datetimepicker@"8.3.0" from the root project
      peer expo@"*" from @expo/[email protected]
      node_modules/@expo/dom-webview
        peerOptional @expo/dom-webview@"*" from [email protected]
    peer react-native@"*" from @expo/[email protected]
    node_modules/@expo/dom-webview
      peerOptional @expo/dom-webview@"*" from [email protected]
    peer react-native@"*" from @expo/[email protected]
    node_modules/@expo/metro-runtime
      peerOptional @expo/metro-runtime@"*" from [email protected]
      node_modules/expo
        expo@"^53.0.0" from the root project
        peerOptional expo@">=50.0.0" from @react-native-community/[email protected]
        node_modules/@react-native-community/datetimepicker
          @react-native-community/datetimepicker@"8.3.0" from the root project
        peer expo@"*" from @expo/[email protected]
        node_modules/@expo/dom-webview
          peerOptional @expo/dom-webview@"*" from [email protected]
    peer react-native@"*" from [email protected]
    node_modules/react-native-webview
      react-native-webview@"13.13.5" from the root project
      peerOptional react-native-webview@"*" from [email protected]
      node_modules/expo
        expo@"^53.0.0" from the root project
        peerOptional expo@">=50.0.0" from @react-native-community/[email protected]
        node_modules/@react-native-community/datetimepicker
          @react-native-community/datetimepicker@"8.3.0" from the root project
        peer expo@"*" from @expo/[email protected]
        node_modules/@expo/dom-webview
          peerOptional @expo/dom-webview@"*" from [email protected]

Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.

brandtnewlabs avatar May 05 '25 17:05 brandtnewlabs

As a temporary workaround, you can use the new DateTimePicker from expo-ui

Glognus avatar May 07 '25 04:05 Glognus

As a temporary workaround, you can use the new DateTimePicker from expo-ui

Will this just work for iOS and not android?

Drivez avatar May 07 '25 07:05 Drivez

@Drivez

Yes, it also works on Android. However, keep in mind that this library is still in alpha. It works well, but some features like setting a minimum or maximum date are not yet available: expo-ui-android

I just discovered another solution, though I’m not sure if it only applies to my case or if it works for everyone. I switched from pnpm back to npm, ran the project again, and the datetimepicker started working properly.

Glognus avatar May 07 '25 12:05 Glognus

any updates regarding this?

salememd avatar May 10 '25 18:05 salememd

Has no one been able to fix this yet?

huybui21 avatar May 12 '25 16:05 huybui21

A quick hack that worked for me is to do npm install --legacy-peer-deps. At least I got my Expo Go running again for now.

Gogoro avatar May 16 '25 05:05 Gogoro

Same issue

cheraff avatar May 16 '25 14:05 cheraff

any alternative? seems like a dead project. Getting into React was the worst decision indeed.

salememd avatar May 17 '25 18:05 salememd

👋 I'm constantly working on an alternative https://github.com/s77rt/react-native-date-picker/

s77rt avatar May 20 '25 00:05 s77rt

Let me just say, this library is compatible with react 19. It's just npm that gives this annoying error without providing any helpful instructions. You can create a .npmrc file and put legacy-peer-deps=true in there to avoid this error. A PR that actually fixes the issue is welcome; this issue has attracted enough attention for someone to contribute. Thank you!

vonovak avatar May 26 '25 10:05 vonovak