diff --git a/src/components/date-picker/picker.vue b/src/components/date-picker/picker.vue index 96f82890..27ff9000 100644 --- a/src/components/date-picker/picker.vue +++ b/src/components/date-picker/picker.vue @@ -532,8 +532,9 @@ const pickerPossibleValues = timePickers[pickerIndex][`${timeParts[col]}List`]; - const nextIndex = pickerPossibleValues.findIndex(({text}) => this.focusedTime.time[pickerIndex][col] === text) + increment; - const nextValue = pickerPossibleValues[nextIndex % pickerPossibleValues.length].text; + const currentIndex = pickerPossibleValues.findIndex(({text}) => this.focusedTime.time[pickerIndex][col] === text); + const nextIndex = (currentIndex + increment + pickerPossibleValues.length) % pickerPossibleValues.length; + const nextValue = pickerPossibleValues[nextIndex].text; const times = this.focusedTime.time.map((time, i) => { if (i !== pickerIndex) return time; time[col] = nextValue;