mirror of https://github.com/ElemeFE/element
parent
f6661e2acf
commit
eac95e99c4
|
@ -312,8 +312,7 @@
|
|||
const target = new Date(type === 'min' ? this.minDate : this.maxDate);
|
||||
if (target) {
|
||||
target.setFullYear(parsedValue.getFullYear());
|
||||
target.setMonth(parsedValue.getMonth());
|
||||
target.setDate(parsedValue.getDate());
|
||||
target.setMonth(parsedValue.getMonth(), parsedValue.getDate());
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -331,8 +330,7 @@
|
|||
const target = new Date(type === 'min' ? this.minDate : this.maxDate);
|
||||
if (target) {
|
||||
target.setFullYear(parsedValue.getFullYear());
|
||||
target.setMonth(parsedValue.getMonth());
|
||||
target.setDate(parsedValue.getDate());
|
||||
target.setMonth(parsedValue.getMonth(), parsedValue.getDate());
|
||||
}
|
||||
if (type === 'min') {
|
||||
if (target < this.maxDate) {
|
||||
|
|
|
@ -293,8 +293,7 @@
|
|||
this.$emit('pick', new Date(value.getTime()));
|
||||
}
|
||||
this.date.setFullYear(value.getFullYear());
|
||||
this.date.setMonth(value.getMonth());
|
||||
this.date.setDate(value.getDate());
|
||||
this.date.setMonth(value.getMonth(), value.getDate());
|
||||
} else if (this.selectionMode === 'week') {
|
||||
this.week = value.week;
|
||||
this.$emit('pick', value.date);
|
||||
|
|
|
@ -151,11 +151,9 @@
|
|||
handleChange() {
|
||||
if (this.minTime > this.maxTime) return;
|
||||
MIN_TIME.setFullYear(this.minTime.getFullYear());
|
||||
MIN_TIME.setMonth(this.minTime.getMonth());
|
||||
MIN_TIME.setDate(this.minTime.getDate());
|
||||
MIN_TIME.setMonth(this.minTime.getMonth(), this.minTime.getDate());
|
||||
MAX_TIME.setFullYear(this.maxTime.getFullYear());
|
||||
MAX_TIME.setMonth(this.maxTime.getMonth());
|
||||
MAX_TIME.setDate(this.maxTime.getDate());
|
||||
MAX_TIME.setMonth(this.maxTime.getMonth(), this.maxTime.getDate());
|
||||
this.$refs.minSpinner.selectableRange = [[MIN_TIME, this.maxTime]];
|
||||
this.$refs.maxSpinner.selectableRange = [[this.minTime, MAX_TIME]];
|
||||
this.handleConfirm(true);
|
||||
|
|
Loading…
Reference in New Issue