DatetimePicker: fix max time error when init value is empty (#8336)

1.no init data
2.click start time and comfirm
3.click end time and comfirm(the end time is not change)
4.error
reason:
not evaluate 'maxDate' value in step1
I will show more details in conversation
This commit is contained in:
Leslie
2017-11-23 19:15:16 +08:00
committed by 杨奕
parent e033313608
commit 55617e0d1a

View File

@@ -508,7 +508,7 @@
this.minTimePickerVisible = visible;
}
if (this.maxDate && this.maxDate.getTime() < this.minDate.getTime()) {
if (!this.maxDate || this.maxDate && this.maxDate.getTime() < this.minDate.getTime()) {
this.maxDate = new Date(this.minDate);
}
},