diff --git a/tp-date-picker.js b/tp-date-picker.js index 3f1e49a..d06b9fc 100644 --- a/tp-date-picker.js +++ b/tp-date-picker.js @@ -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; } - }); + } } }