Skip to content

Commit

Permalink
fix(ui5-datetime-picker): fix scrollbar issue in IE11 (#2154)
Browse files Browse the repository at this point in the history
* DateTimePicker - fixed scrollbar issue in IE11

* lint fix

* fixing comments

* fixing comments
  • Loading branch information
NHristov-sap authored Sep 1, 2020
1 parent 3d4cc0c commit 306572f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/main/src/DatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import CalendarDate from "@ui5/webcomponents-localization/dist/dates/CalendarDat
import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js";
import getEffectiveAriaLabelText from "@ui5/webcomponents-base/dist/util/getEffectiveAriaLabelText.js";
import { isShow, isF4 } from "@ui5/webcomponents-base/dist/Keys.js";
import { isPhone } from "@ui5/webcomponents-base/dist/Device.js";
import { isPhone, isIE } from "@ui5/webcomponents-base/dist/Device.js";
import { fetchI18nBundle, getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
import "@ui5/webcomponents-icons/dist/icons/appointment-2.js";
import "@ui5/webcomponents-icons/dist/icons/decline.js";
Expand Down Expand Up @@ -661,6 +661,10 @@ class DatePicker extends UI5Element {
return this.phone;
}

get _isIE() {
return isIE();
}

getFormat() {
if (this._isPattern) {
this._oDateFormat = DateFormat.getInstance({
Expand Down
1 change: 1 addition & 0 deletions packages/main/src/DatePickerPopover.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
stay-open-on-scroll="{{_respPopoverConfig.stayOpenOnScroll}}"
placement-type="Bottom"
horizontal-align="Left"
?disable-scrolling="{{_isIE}}"
no-arrow
with-padding
no-stretch
Expand Down
11 changes: 11 additions & 0 deletions packages/main/src/Popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,17 @@ const metadata = {
type: Boolean,
},

/**
* Defines whether the content is scrollable.
*
* @type {boolean}
* @defaultvalue false
* @private
*/
disableScrolling: {
type: Boolean,
},

/**
* Sets the X translation of the arrow
*
Expand Down
4 changes: 4 additions & 0 deletions packages/main/src/themes/PopupsCommon.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,7 @@
:host(:not([header-text])) .ui5-popup-header-text {
display: none;
}

:host([disable-scrolling]) .ui5-popup-content {
overflow: hidden;
}

0 comments on commit 306572f

Please sign in to comment.