Skip to content

Commit 306572f

Browse files
authored
fix(ui5-datetime-picker): fix scrollbar issue in IE11 (#2154)
* DateTimePicker - fixed scrollbar issue in IE11 * lint fix * fixing comments * fixing comments
1 parent 3d4cc0c commit 306572f

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

packages/main/src/DatePicker.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import CalendarDate from "@ui5/webcomponents-localization/dist/dates/CalendarDat
1111
import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js";
1212
import getEffectiveAriaLabelText from "@ui5/webcomponents-base/dist/util/getEffectiveAriaLabelText.js";
1313
import { isShow, isF4 } from "@ui5/webcomponents-base/dist/Keys.js";
14-
import { isPhone } from "@ui5/webcomponents-base/dist/Device.js";
14+
import { isPhone, isIE } from "@ui5/webcomponents-base/dist/Device.js";
1515
import { fetchI18nBundle, getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
1616
import "@ui5/webcomponents-icons/dist/icons/appointment-2.js";
1717
import "@ui5/webcomponents-icons/dist/icons/decline.js";
@@ -661,6 +661,10 @@ class DatePicker extends UI5Element {
661661
return this.phone;
662662
}
663663

664+
get _isIE() {
665+
return isIE();
666+
}
667+
664668
getFormat() {
665669
if (this._isPattern) {
666670
this._oDateFormat = DateFormat.getInstance({

packages/main/src/DatePickerPopover.hbs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
stay-open-on-scroll="{{_respPopoverConfig.stayOpenOnScroll}}"
55
placement-type="Bottom"
66
horizontal-align="Left"
7+
?disable-scrolling="{{_isIE}}"
78
no-arrow
89
with-padding
910
no-stretch

packages/main/src/Popover.js

+11
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,17 @@ const metadata = {
129129
type: Boolean,
130130
},
131131

132+
/**
133+
* Defines whether the content is scrollable.
134+
*
135+
* @type {boolean}
136+
* @defaultvalue false
137+
* @private
138+
*/
139+
disableScrolling: {
140+
type: Boolean,
141+
},
142+
132143
/**
133144
* Sets the X translation of the arrow
134145
*

packages/main/src/themes/PopupsCommon.css

+4
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,7 @@
8080
:host(:not([header-text])) .ui5-popup-header-text {
8181
display: none;
8282
}
83+
84+
:host([disable-scrolling]) .ui5-popup-content {
85+
overflow: hidden;
86+
}

0 commit comments

Comments
 (0)