fix timepicker error
This commit is contained in:
parent
410a5fbca7
commit
f0bd71f9a8
1 changed files with 3 additions and 2 deletions
|
@ -532,8 +532,9 @@
|
||||||
|
|
||||||
|
|
||||||
const pickerPossibleValues = timePickers[pickerIndex][`${timeParts[col]}List`];
|
const pickerPossibleValues = timePickers[pickerIndex][`${timeParts[col]}List`];
|
||||||
const nextIndex = pickerPossibleValues.findIndex(({text}) => this.focusedTime.time[pickerIndex][col] === text) + increment;
|
const currentIndex = pickerPossibleValues.findIndex(({text}) => this.focusedTime.time[pickerIndex][col] === text);
|
||||||
const nextValue = pickerPossibleValues[nextIndex % pickerPossibleValues.length].text;
|
const nextIndex = (currentIndex + increment + pickerPossibleValues.length) % pickerPossibleValues.length;
|
||||||
|
const nextValue = pickerPossibleValues[nextIndex].text;
|
||||||
const times = this.focusedTime.time.map((time, i) => {
|
const times = this.focusedTime.time.map((time, i) => {
|
||||||
if (i !== pickerIndex) return time;
|
if (i !== pickerIndex) return time;
|
||||||
time[col] = nextValue;
|
time[col] = nextValue;
|
||||||
|
|
Loading…
Add table
Reference in a new issue