Use view date to init time

pull/1792/head
Cagatay Civici 2021-11-17 17:36:37 +03:00
parent c6aaffe77a
commit e620db8a71
1 changed files with 1 additions and 3 deletions

View File

@ -1229,7 +1229,6 @@ export default {
let newHour = this.currentHour + this.stepHour;
let newPM = this.pm;
if (this.hourFormat == '24')
newHour = (newHour >= 24) ? (newHour - 24) : newHour;
else if (this.hourFormat == '12') {
@ -1240,7 +1239,6 @@ export default {
newHour = (newHour >= 13) ? (newHour - 12) : newHour;
}
if (this.validateTime(newHour, this.currentMinute, this.currentSecond, newPM)) {
this.currentHour = newHour;
this.pm = newPM;
@ -1300,7 +1298,7 @@ export default {
event.preventDefault();
},
updateModelTime() {
let value = this.isComparable() ? this.modelValue : new Date();
let value = this.isComparable() ? this.modelValue : this.viewDate;
if (this.isRangeSelection()) {
value = this.modelValue[1] || this.modelValue[0];