Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/88.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
JQuery日期选择器中的CSS问题_Jquery_Css - Fatal编程技术网

JQuery日期选择器中的CSS问题

JQuery日期选择器中的CSS问题,jquery,css,Jquery,Css,我在JQuery中为日期选择器使用以下脚本: $('#dob').datepicker({ minDate: new Date(1900,1-1,1), maxDate: '-18Y', dateFormat: 'dd-M-yy', changeMonth: true, changeYear: true, yearRange: '-100:-18'

我在JQuery中为日期选择器使用以下脚本:

         $('#dob').datepicker({
            minDate: new Date(1900,1-1,1), maxDate: '-18Y',
            dateFormat: 'dd-M-yy',
            changeMonth: true,
            changeYear: true,
            yearRange: '-100:-18'
        });
但日期选择器位于表下,只有标题部分显示其余部分隐藏在表中

我尝试了下面的css,我把它放在style.css中,但没有解决

.ui-datepicker{ z-index: 9999 !important;}

如何解决这个问题?在这样调用函数时,请帮助使用
z-index

$('#dob').datepicker({
    minDate: new Date(1900,1-1,1), maxDate: '-18Y',
    dateFormat: 'dd-M-yy',
    changeMonth: true,
    changeYear: true,
    yearRange: '-100:-18',
    //comment the beforeShow handler if you want to see the ugly overlay
    beforeShow: function() {
        setTimeout(function(){
            $('.ui-datepicker-div').css({'position': 'relative', 'z-index': 99999999999999});
        }, 0);
    }
});

像这样调用函数时使用
z-index

$('#dob').datepicker({
    minDate: new Date(1900,1-1,1), maxDate: '-18Y',
    dateFormat: 'dd-M-yy',
    changeMonth: true,
    changeYear: true,
    yearRange: '-100:-18',
    //comment the beforeShow handler if you want to see the ugly overlay
    beforeShow: function() {
        setTimeout(function(){
            $('.ui-datepicker-div').css({'position': 'relative', 'z-index': 99999999999999});
        }, 0);
    }
});

我还需要添加我在发布的示例中使用的参数。如何在您的方法中使用这些参数?我不确定这是否是问题所在,但由于此位置,绝对日期选择器位于页面下方。关于未命中css的Y应应用于
。ui datepicker div
。试着告诉我它起作用了??还是不起作用。仍然是在所有浏览器中只显示datepicker的标题。我还需要添加我在发布的示例中使用的参数。如何在您的方法中使用这些参数?我不确定这是否是问题所在,但由于此位置,绝对日期选择器位于页面下方。关于未命中css的Y应应用于
。ui datepicker div
。试着告诉我它起作用了??还是不起作用。在所有浏览器中仍然只显示datepicker的标题。