* User clicked with the mouser or pressed Enter/Space * @param e * @private
(e: Event)
| 360 | * @private |
| 361 | */ |
| 362 | _selectYear(e: Event) { |
| 363 | e.preventDefault(); |
| 364 | const target = e.target as HTMLElement; |
| 365 | |
| 366 | if (target.className.indexOf("ui5-yp-item") === -1) { |
| 367 | return; |
| 368 | } |
| 369 | |
| 370 | const timestamp = this._getTimestampFromDom(target); |
| 371 | this._safelySetTimestamp(timestamp); |
| 372 | this._updateSecondTimestamp(); |
| 373 | this._updateSelectedDates(timestamp); |
| 374 | |
| 375 | this.fireDecoratorEvent("change", { |
| 376 | timestamp: this.timestamp!, |
| 377 | dates: this.selectedDates, |
| 378 | }); |
| 379 | } |
| 380 | |
| 381 | _updateSelectedDates(timestamp: number) { |
| 382 | if (this.selectionMode === CalendarSelectionMode.Range && this.selectedDates.length === 1) { |
no test coverage detected