【问题标题】:Angular Material Date picker issue inside kendo column filter剑道列过滤器内的角度材料日期选择器问题
【发布时间】:2021-10-03 01:24:12
【问题描述】:

我有一个用于剑道网格列过滤器的模板,我使用材料日期选择器来选择日期。

剑道网格位于材质对话框内时发生的问题。

Issue

正如您在图像上看到的,mat datepicker 出现在过滤器后面。这是因为 mat-datepicker 对话框在 cdk-overlay 中被实例化,在包含网格的同一个 div 中,所以它们共享相同的 Z-index。

Inspector code

并且 kendo-grid 过滤器正在 app.component 内部实例化。

Inspector code 2

我认为我们有两种可能的解决方案:在 cdk-overlay div 中实例化过滤器的 kendo-popup 或将 mat-datePicker 移动到具有更高 z-index 的 kendo-popup 旁边。

如果我使用 kendo-datepicker,则不会发生此问题,因为它在 kendo-popup 旁边实例化,但我需要 mat-datepicker 来满足设计要求。

Inspector code 3

提前致谢,

V

【问题讨论】:

    标签: angular kendo-ui angular-material datepicker kendo-grid


    【解决方案1】:

    telerik 论坛回答了我的问题。我必须将以下代码附加到网格的@Component。通过这个修改,当我在弹出窗口中使用我的网格时,剑道弹出窗口会在 cdk 叠加层中实例化。

    providers: [
        {
          // Provide the current component element as Popup container.
          provide: POPUP_CONTAINER,
          useExisting: ElementRef,
        },
        // Create a new Popup Service that uses the provided container.
        PopupService,
      ],
    

    【讨论】:

      猜你喜欢
      • 2021-01-21
      • 2018-09-13
      • 2022-01-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-27
      相关资源
      最近更新 更多