嗨,我有一个JQuery模式弹出窗口,我加载超文本标记语言。我的scrpt文件中有以下代码:
  //date code - move to reusable.
    $('.dateDavy').datepicker({
        showOn: 'button',
        buttonImage: '/Content/images/Control_MonthCalendar.bmp',
        buttonText: 'Enter Date',
        buttonImageOnly: true,
        dateFormat: 'dd/mm/yy',
        yearRange: '-115:+3',
        changeMonth: true,
        changeYear: true            
    });问题是,当我单击日历的图像时,它会弹出到我的模式表单后面。
感谢您的任何帮助
发布于 2009-10-09 10:58:39
向在jQuery UI CSS之后加载的CSS文件添加一些CSS,该CSS文件将ui-datepicker类设置为具有高于模式对话框的z索引。我不记得我脑子里想的是什么了,所以可能需要做一点实验。如果需要datepicker仅在对话框显示时位于对话框上方,则还可以在对话框打开事件的回调期间向ui-datepicker-div DIV添加和删除z-index,否则将具有正常的z-index。
.ui-datepicker
{
   z-index: 32767;
}
$('selector').dialog({
     open: function(event,ui) {
          $('#ui-datepicker-div').css('z-index',32767);
     },
     close: function(event,ui) {
          $('#ui-datepicker-div').css('z-index',null);
     }
});https://stackoverflow.com/questions/1543062
复制相似问题