mirror of https://github.com/ElemeFE/element
parent
87b842cfa3
commit
1b8657ce0d
|
@ -80,22 +80,11 @@
|
|||
},
|
||||
|
||||
watch: {
|
||||
hours(newVal) {
|
||||
this.ajustElTop('hour', newVal);
|
||||
},
|
||||
|
||||
minutes(newVal) {
|
||||
this.ajustElTop('minute', newVal);
|
||||
},
|
||||
|
||||
seconds(newVal) {
|
||||
this.ajustElTop('second', newVal);
|
||||
},
|
||||
|
||||
hoursPrivate(newVal, oldVal) {
|
||||
if (!(newVal >= 0 && newVal <= 23)) {
|
||||
this.hoursPrivate = oldVal;
|
||||
}
|
||||
this.ajustElTop('hour', newVal);
|
||||
this.$emit('change', { hours: newVal });
|
||||
},
|
||||
|
||||
|
@ -103,6 +92,7 @@
|
|||
if (!(newVal >= 0 && newVal <= 59)) {
|
||||
this.minutesPrivate = oldVal;
|
||||
}
|
||||
this.ajustElTop('minute', newVal);
|
||||
this.$emit('change', { minutes: newVal });
|
||||
},
|
||||
|
||||
|
@ -110,7 +100,7 @@
|
|||
if (!(newVal >= 0 && newVal <= 59)) {
|
||||
this.secondsPrivate = oldVal;
|
||||
}
|
||||
|
||||
this.ajustElTop('second', newVal);
|
||||
this.$emit('change', { seconds: newVal });
|
||||
}
|
||||
},
|
||||
|
|
|
@ -150,6 +150,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());
|
||||
this.$refs.minSpinner.selectableRange = [[MIN_TIME, this.maxTime]];
|
||||
this.$refs.maxSpinner.selectableRange = [[this.minTime, MAX_TIME]];
|
||||
this.handleConfirm(true);
|
||||
|
|
|
@ -448,7 +448,7 @@ export default {
|
|||
|
||||
this.picker.$on('dodestroy', this.doDestroy);
|
||||
this.picker.$on('pick', (date, visible = false) => {
|
||||
if (this.dateChanged(date, this.value)) this.$emit('input', date);
|
||||
this.$emit('input', date);
|
||||
this.pickerVisible = this.picker.visible = visible;
|
||||
this.picker.resetView && this.picker.resetView();
|
||||
});
|
||||
|
|
|
@ -145,7 +145,7 @@ export const limitRange = function(date, ranges) {
|
|||
if (!ranges || !ranges.length) return date;
|
||||
|
||||
const len = ranges.length;
|
||||
const format = 'HH:mm:ss';
|
||||
const format = 'yyyy-MM-dd HH:mm:ss';
|
||||
|
||||
date = dateUtil.parse(dateUtil.format(date, format), format);
|
||||
for (let i = 0; i < len; i++) {
|
||||
|
|
Loading…
Reference in New Issue