代码之家  ›  专栏  ›  技术社区  ›  DaRoGa

引导DateTimePicker隐藏在JQuery对话框中

  •  1
  • DaRoGa  · 技术社区  · 7 年前

    我有一个引导日期时间选择器( as here

    以下是它当前的外观:

    enter image description here

    正如你所见,这离理想还很远。

    有人有其他想法吗?

    我的代码如下:

    <div class="mui-textfield">
        <input type="date" id="txtDate"/>
        <label>Date</label>
    </div>
    
    $('#txtDate').datetimepicker({
        format: 'DD-MM-YYYY',
        keepOpen: false
    });
    
    1 回复  |  直到 7 年前
        1
  •  0
  •   DaRoGa    7 年前

    这个 z-index overflow: visible 在对话框和对话框内容div上,以便对其进行转义。这就是最终为我工作的css:

    .datepicker
    {
        z-index: 99999   !important;
    }
    .ui-dialog {
        overflow:visible !important;
    }
    .ui-dialog-content {
        overflow:visible !important;
    }