mldb / rn-persian-date-picker

simple date picker for Jalali and Gregorian
Apache License 2.0
12 stars 1 forks source link

null is not an object (evaluating "picker._init") #1

Closed mahdipc closed 5 years ago

mahdipc commented 5 years ago

I use ` <View style={{ flex: 1, backgroundColor: "blue", justifyContent: "center", alignItems: "center" }}

<TouchableOpacity onPress={() => this.picker.showPicker()}> <View style={{ height: 80, width: 180, backgroundColor: "red" }}>

{/* {selectedDate.format("jYYYY/jMM/jDD")} //for more formats and */} 1400/12/1


<PersianDatePicker type="Jalali" yearCount={10} onConfirm={date => this.setState({ selectedDate: date })} ref={ref => (this.picker = ref)} /> ` and show error null is not an object (evaluating "picker._init")

mldb commented 5 years ago

@mahdipc Please make sure react-native-picker linked correctly.