Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useNativeDriver is required #471

Open
HossamElharmeil opened this issue Jan 12, 2023 · 1 comment
Open

useNativeDriver is required #471

HossamElharmeil opened this issue Jan 12, 2023 · 1 comment

Comments

@HossamElharmeil
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

There is a warning that pops up once we open the date picker. The warning indicates that useNativeDriver is required and must be explicitly set to either true or false.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-datepicker/datepicker.js b/node_modules/react-native-datepicker/datepicker.js
index ac6cacd..d672123 100644
--- a/node_modules/react-native-datepicker/datepicker.js
+++ b/node_modules/react-native-datepicker/datepicker.js
@@ -66,7 +66,8 @@ class DatePicker extends Component {
         this.state.animatedHeight,
         {
           toValue: height,
-          duration: duration
+          duration: duration,
+          useNativeDriver: false
         }
       ).start();
     } else {
@@ -74,7 +75,8 @@ class DatePicker extends Component {
         this.state.animatedHeight,
         {
           toValue: 0,
-          duration: duration
+          duration: duration,
+          useNativeDriver: false
         }
       ).start(() => {
         this.setState({modalVisible: visible});

This issue body was partially generated by patch-package.

@tacianoscur
Copy link

same here

Screenshot 2023-02-05 at 22 00 10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants