fix: 修复minDate失效的bug #2789 (#2804)

谢谢
This commit is contained in:
iceqing 2021-10-30 14:09:45 +08:00 committed by GitHub
parent e5280b9d2c
commit b0dabb4fd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,8 +100,8 @@ export class CustomDaysView extends DaysView {
confirm = () => {
let date = (this.props.selectedDate || this.props.viewDate).clone();
// 如果 minDate 是可用的,且比当前日期,则用 minDate
if (this.props.minDate?.isValid() && this.props.minDate?.isBefore(date)) {
// 如果 minDate 是可用的,且比当前日期,则用 minDate
if (this.props.minDate?.isValid() && this.props.minDate?.isAfter(date)) {
date = this.props.minDate.clone();
}