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