* @override
(e: CustomEvent<CalendarSelectionChangeEventDetail>)
| 330 | * @override |
| 331 | */ |
| 332 | async onSelectedDatesChange(e: CustomEvent<CalendarSelectionChangeEventDetail>) { |
| 333 | e.preventDefault(); |
| 334 | |
| 335 | // Try to get the current time value from the time picker, |
| 336 | // but fallback to last valid value if current picker time is empty or invalid |
| 337 | let timeValue = this._clocks?.value || ""; |
| 338 | if (!timeValue || !this.isValidValue(timeValue)) { |
| 339 | timeValue = this._lastValidValue || this.getValueFormat().format(UI5Date.getInstance()); |
| 340 | } |
| 341 | |
| 342 | this._previewValues = { |
| 343 | ...this._previewValues, |
| 344 | calendarTimestamp: e.detail.timestamp, |
| 345 | calendarValue: e.detail.selectedValues[0], |
| 346 | timeSelectionValue: timeValue, |
| 347 | }; |
| 348 | this._showTimeView = true; |
| 349 | |
| 350 | if (this.showDateView) { |
| 351 | return; |
| 352 | } |
| 353 | |
| 354 | await renderFinished(); |
| 355 | this._clocks.focus(); |
| 356 | } |
| 357 | |
| 358 | onTimeSelectionChange(e: CustomEvent<TimeSelectionChangeEventDetail>) { |
| 359 | this._previewValues = { |
nothing calls this directly
no test coverage detected