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:
trading_peter 2025-01-02 22:28:12 +01:00
parent bb638c7e8a
commit bc54fabe96

View File

@ -347,12 +347,13 @@ class TpDatePicker extends FormElement(LitElement) {
selectYear(e) {
const elList = e.composedPath();
elList.forEach(el => {
for (const el of elList) {
if (el.value) {
this.year = el.value;
this.showYearSelector = false;
break;
}
}
});
}
}