Break the loop if a value was found when clicking an entry in the year selector.
Otherwise it can pick up the value of the date picker itself.
This commit is contained in:
parent
bb638c7e8a
commit
bc54fabe96
@ -347,12 +347,13 @@ class TpDatePicker extends FormElement(LitElement) {
|
|||||||
|
|
||||||
selectYear(e) {
|
selectYear(e) {
|
||||||
const elList = e.composedPath();
|
const elList = e.composedPath();
|
||||||
elList.forEach(el => {
|
for (const el of elList) {
|
||||||
if (el.value) {
|
if (el.value) {
|
||||||
this.year = el.value;
|
this.year = el.value;
|
||||||
this.showYearSelector = false;
|
this.showYearSelector = false;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user