Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native - Invariant Violation "RNDateTimePicker"

I'm trying to use the React Native DateTimePicker library in my app and I get the following error when I attempt to pick a date:

Invariant Violation: Invariant Violation: requireNativeComponent: "RNDateTimePicker" was not 
found in the UIManager.

Anyone else experiences this error? I have gone through other posts like the following but still can't seem to figure it out. Git repo

I am using expo - which may not be compatible with this library. If not, does anyone else have any other recommendations for a date/time library?


I also tried linking, but to no prevail

like image 502
will Avatar asked Jan 22 '20 23:01

will


3 Answers

If you are not on Expo then

Update XCode.

Since version 3.0, RNDateTimePicker requires XCode 11.6 to build.

you need XCode 11.6 to build this version, and you need this version to properly support iOS 14 (for that you need XCode 12)

From: https://github.com/react-native-community/datetimepicker/releases/tag/v3.0.0

like image 21
AlVelig Avatar answered Sep 19 '22 04:09

AlVelig


You cannot use react-native-dateTimepicker because it requires manual linking of native code. So its not possible with expo. You can use the expo date time picker which is exclusively made for expo : Check this out expo-picker . Hope it helps.

like image 70
Gaurav Roy Avatar answered Sep 21 '22 04:09

Gaurav Roy


After library install. Do pod install

like image 31
Amit Avatar answered Sep 18 '22 04:09

Amit