* Selects a month, when user made selection with mouse or using Space/Enter. * @param e * @private
(e: Event)
| 367 | * @private |
| 368 | */ |
| 369 | _selectMonth(e: Event) { |
| 370 | e.preventDefault(); |
| 371 | const target = e.target as HTMLElement; |
| 372 | |
| 373 | if (!target.classList.contains("ui5-mp-item")) { |
| 374 | return; |
| 375 | } |
| 376 | |
| 377 | const timestamp = this._getTimestampFromDom(target); |
| 378 | this._safelySetTimestamp(timestamp); |
| 379 | this._updateSecondTimestamp(); |
| 380 | this._updateSelectedDates(timestamp); |
| 381 | |
| 382 | this.fireDecoratorEvent("change", { |
| 383 | timestamp: this.timestamp!, |
| 384 | dates: this.selectedDates, |
| 385 | }); |
| 386 | } |
| 387 | |
| 388 | _updateSelectedDates(timestamp: number) { |
| 389 | if (this.selectionMode === CalendarSelectionMode.Range && this.selectedDates.length === 1) { |
no test coverage detected