* User selected range with the mouse or pressed Enter/Space. * @param e * @private
(e: Event)
| 407 | * @private |
| 408 | */ |
| 409 | _selectYearRange(e: Event) { |
| 410 | e.preventDefault(); |
| 411 | const target = e.target as HTMLElement; |
| 412 | |
| 413 | if (target.className.indexOf("ui5-yrp-item") === -1) { |
| 414 | return; |
| 415 | } |
| 416 | |
| 417 | let timestamp = this._getTimestampFromDom(target); |
| 418 | timestamp = this._getYearPickerCenteredTimestamp(timestamp); |
| 419 | |
| 420 | this._safelySetTimestamp(timestamp); |
| 421 | this.fireDecoratorEvent("change", { |
| 422 | timestamp: this.timestamp!, |
| 423 | }); |
| 424 | } |
| 425 | |
| 426 | /** |
| 427 | * Returns the centered timestamp for the year picker. |
no test coverage detected