Pressing the mask with datePicker1Ref open is calling the onDateEndChange function
It appears that if you have multiple DatePicker components mounted they will not listen to functions called on their ref objects independently.
I'm noticing that always the lowest component in the DOM's ref always will operate its internal methods on rather than the ones set for its own component.
If I were to open the first instance, and then press the mask to trigger the ref onPressConfirm(), the onDateEndChange function will be called (which is on the onDateChange of the second component! WTF?
Expected Behavior
Pressing the mask with datePicker1Ref open should call the onDateStartChange function
Issue
Pressing the mask with datePicker1Ref open is calling the
onDateEndChange
functionIt appears that if you have multiple DatePicker components mounted they will not listen to functions called on their ref objects independently.
I'm noticing that always the lowest component in the DOM's ref always will operate its internal methods on rather than the ones set for its own component.
If I were to open the first instance, and then press the
mask
to trigger the refonPressConfirm()
, theonDateEndChange
function will be called (which is on the onDateChange of the second component! WTF?Expected Behavior
Pressing the mask with datePicker1Ref open should call the
onDateStartChange
functionCode
Note that the
onPressMask
function isn't being called on the second component, but the onPressConfirm() is being triggered on the datePicker2RefEnvironment
react-native -v
: 0.60.4node -v
: 11.9.0npm -v
: 6.7.0 ~4.yarn --version
:~target platform
: iOSoperating system
: Mac OS X 10.14.6