xgfe / react-native-datepicker

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

OnClick of custom icon in android unable to open the calendar #339

Open Poolside21 opened 5 years ago

Poolside21 commented 5 years ago

OnClick of a custom icon in android unable to open the map

The calendar should open is not toggling however the placeholder is working fine.Can Anyone help?

Code

<View style={{ alignSelf: 'center'}} > <Text style={{ marginTop: dynamicSize(10), fontSize: dynamicSize(20), paddingLeft: dynamicSize(5), color: 'black' }}

Date Of Expiry <View style={{ flexDirection: 'row', paddingLeft: dynamicSize(10), backgroundColor: 'white', paddingVertical: dynamicSize(10), paddingRight: dynamicSize(10), borderRadius: dynamicSize(50), // borderWidth: dynamicSize(0.2), marginVertical: dynamicSize(8), borderWidth: dynamicSize(2), borderColor: "lightgray", height: dynamicSize(50), width: width - 50, alignItems: 'center', }} > <DatePicker mode="date" placeholder="Date Of Expiry" confirmBtnText="Submit" cancelBtnText="Cancel" iconSource={calendarIcon} date={this.state.dateOfExpiry} onDateChange={(date)=> this.setState({dateOfExpiry:date})} minDate={maxDate} customStyles={{ dateIcon: { position: 'absolute', right: dynamicSize(-150), width:dynamicSize(30), height:dynamicSize(30),

              },
              dateInput: {
                width: width,
                alignItems:'flex-start',
                paddingHorizontal:dynamicSize(7),
                borderWidth:dynamicSize(0)
              }
            }}
          />
        </View>
      </View>

Environment

  1. react-native -0.57.8:
  2. target platform: Android