We came across the case when if block:
if (isBefore(time, activeTime) || isEqual(time, activeTime)) { this.centerLi = li; }
will result in false and this.centerLi = undefined. It will cause the APP crash with message:
One possible solution is to add a condition to this (https://github.com/Hacker0x01/react-datepicker/blob/master/src/time.jsx):
this.list.scrollTop = this.centerLi && Time.calcCenterPosition( this.props.monthRef ? this.props.monthRef.clientHeight - this.header.clientHeight : this.list.clientHeight, this.centerLi );
We came across the case when if block:
if (isBefore(time, activeTime) || isEqual(time, activeTime)) { this.centerLi = li; }
will result in false and this.centerLi = undefined. It will cause the APP crash with message:One possible solution is to add a condition to this (https://github.com/Hacker0x01/react-datepicker/blob/master/src/time.jsx):
this.list.scrollTop = this.centerLi && Time.calcCenterPosition( this.props.monthRef ? this.props.monthRef.clientHeight - this.header.clientHeight : this.list.clientHeight, this.centerLi );
PR: https://github.com/Hacker0x01/react-datepicker/pull/3786