1

See Example

After clicking the show container link the datepicker component - 2nd input - is shown below the UI dialog. What should I do to show it above the UI dialog?

4

5 回答 5

7

You could set the z-index of .ui-datepicker to 1003.

.ui-datepicker
{
  z-index: 1003;
}

Right now, .ui-widget-overlay has a z-index of 1001 and the .ui-dialog has a z-index of 1002. The datepicker has no z-index, and defaults to being below the z-index of these others. Up it to a higher z-index and it should appear above the dialog.

于 2009-10-08T17:55:23.810 回答
3

我有一个类似的问题,但日期选择器对话框有一个style="z-index:1"让我感到震惊的问题。

所以我不得不添加!important关键字。

.ui-datepicker {
  z-index: 1003 !important;
}
于 2011-09-11T12:45:04.590 回答
1

You need to set the z-index on the datepicker, e.g.:

.ui-datepicker 
{
    z-index:20000;
}

Should work for you.

于 2009-10-08T17:55:20.130 回答
0

如果它是旧浏览器(IE6),如果 z-index 不起作用,您可能需要“BGIFrame”插件并设置对话框选项以使用它?

于 2011-09-01T13:27:22.880 回答
0

我已经通过在 JS 上添加这个来修复

  //allow interaction of select2, date and time picker on jQuery UI dialog
    $.ui.dialog.prototype._allowInteraction = function(e) {
    return !!$(e.target).closest('.ui-dialog, .ui-datepicker, .select2-drop').length;
  };
于 2014-09-25T13:21:12.173 回答