Skip to content

Commit a52e4c1

Browse files
authored
fix(ui5-time-picker): Add interactive mode for the icon on mobile devices (#12500)
1 parent 588fbbf commit a52e4c1

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

packages/main/src/TimePicker.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
} from "@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js";
2323
import "@ui5/webcomponents-localization/dist/features/calendar/Gregorian.js"; // default calendar for bundling
2424
import DateFormat from "@ui5/webcomponents-localization/dist/DateFormat.js";
25+
import IconMode from "./types/IconMode.js";
2526
import getCachedLocaleDataInstance from "@ui5/webcomponents-localization/dist/getCachedLocaleDataInstance.js";
2627
import {
2728
isShow,
@@ -458,6 +459,14 @@ class TimePicker extends UI5Element implements IFormInputElement {
458459
return this.hasValueStateText && !this._inputsPopover?.open;
459460
}
460461

462+
/**
463+
* Defines whether the value help icon is hidden
464+
* @private
465+
*/
466+
get _iconMode() {
467+
return isDesktop() ? IconMode.Decorative : IconMode.Interactive;
468+
}
469+
461470
onTimeSelectionChange(e: CustomEvent<TimeSelectionChangeEventDetail>) {
462471
this.tempValue = e.detail.value; // every time the user changes the time selection -> update tempValue
463472
}

packages/main/src/TimePickerTemplate.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export default function TimePickerTemplate(this: TimePicker) {
3939
name={timeEntryRequest}
4040
tabindex={-1}
4141
showTooltip={true}
42+
mode={this._iconMode}
4243
onClick={this._togglePicker}
4344
class={{
4445
"ui5-time-picker-input-icon-button": true,

0 commit comments

Comments
 (0)