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?
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.
我有一个类似的问题,但日期选择器对话框有一个style="z-index:1"
让我感到震惊的问题。
所以我不得不添加!important
关键字。
.ui-datepicker {
z-index: 1003 !important;
}
You need to set the z-index on the datepicker, e.g.:
.ui-datepicker
{
z-index:20000;
}
Should work for you.
如果它是旧浏览器(IE6),如果 z-index 不起作用,您可能需要“BGIFrame”插件并设置对话框选项以使用它?
我已经通过在 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;
};