xgfe / react-native-datepicker

react native datePicker component for both Android and IOS, useing DatePikcerAndroid, TimePickerAndroid and DatePickerIOS
MIT License
2.12k stars 727 forks source link

Problem with useNativeDriver and componentWillReceiveProps #440

Open nihil-pro opened 3 years ago

nihil-pro commented 3 years ago

Issue

Two warnings Animated: useNativeDriver was not specified. This is a required option and must be explicitly set to true or false and Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

Expected Behavior

Code

<DatePicker
   customStyles={{
      dateInput: {flexDirection: 'row', borderWidth: 0, justifyContent: 'flex-end', paddingTop: 3},
   }}
   minDate="2020-10-01"
   maxDate={Dates().today}
   confirmBtnText="Apply"
   cancelBtnText="Close"
   onDateChange={date => setDay(new Date(date).toLocaleDateString())}
/>

Environment

  1. react-native -v: 39.0.0
  2. node -v: 14.2.0
  3. npm -v: 6.14.4
  4. target platform: Android and iOS
  5. operating system: mac os
dnlmzw commented 3 years ago

+1

VVassyk commented 3 years ago

+1

JoaquinBeceiro commented 3 years ago

+1

appsgenie commented 3 years ago

+1

MahmutGundogduKizilay commented 3 years ago

+1 too

ixez commented 3 years ago

+1

dibyopra commented 3 years ago

+1

YunusEmreNalbant commented 3 years ago

@nihil-pro @dnlmzw @MahmutGundogduKizilay @ixez @dibyopra @Wassyk @JoaquinBeceiro @appseugene

try this: https://github.com/xgfe/react-native-datepicker/pull/441/commits/db1b18ecd9dcffdfe6c4668fa15afbcd6041b97b

Dougsrodrigues commented 3 years ago

+1

AsABarranco commented 2 years ago

+1

cinkagan commented 2 years ago

+1