fix: minDate导致日期视图错误问题 (#2459)

This commit is contained in:
RickCole 2021-08-27 16:16:56 +08:00 committed by GitHub
parent 6aa492309e
commit 86ccc4267d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,7 +72,7 @@ class BaseDatePicker extends ReactDatePicker {
const props = origin.call(this);
props.setDateTimeState = this.setState.bind(this);
if (this.props.minDate) {
if ((this.props.minDate as moment.Moment)?.isValid()) {
props.viewDate = this.props.minDate;
}