update TimePicker
update TimePicker
This commit is contained in:
parent
a18d2b3a8a
commit
964582b399
2 changed files with 12 additions and 2 deletions
|
@ -144,7 +144,17 @@
|
||||||
this.dateEnd.setSeconds(dateEnd.seconds);
|
this.dateEnd.setSeconds(dateEnd.seconds);
|
||||||
this.secondsEnd = this.dateEnd.getSeconds();
|
this.secondsEnd = this.dateEnd.getSeconds();
|
||||||
}
|
}
|
||||||
if (emit) this.$emit('on-pick', [this.date, this.dateEnd], true);
|
// judge endTime > startTime?
|
||||||
|
if (this.dateEnd < this.date) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.dateEnd = new Date(this.date);
|
||||||
|
this.hoursEnd = this.dateEnd.getHours();
|
||||||
|
this.minutesEnd = this.dateEnd.getMinutes();
|
||||||
|
this.secondsEnd = this.dateEnd.getSeconds();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
if (emit) this.$emit('on-pick', [this.date, this.dateEnd], true);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleStartChange (date) {
|
handleStartChange (date) {
|
||||||
this.handleChange(date, {});
|
this.handleChange(date, {});
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
c (s) {
|
c (s) {
|
||||||
// console.log(1,s);
|
console.log(s);
|
||||||
// this.value2 = s;
|
// this.value2 = s;
|
||||||
},
|
},
|
||||||
ok () {
|
ok () {
|
||||||
|
|
Loading…
Add table
Reference in a new issue