jquery
  • asp.net-mvc
  • kendo-ui
  • 2014-11-25 50 views 0 likes 
    0

    我有一个动态生成的kendo accordion面板内的输入列表。Kendo Datepicker z index

    的输入是这样产生的:

    rowContent += "<td><input " + checked + " class='" + field.FieldTypeInput + "' type='" + field.FieldTypeInput + "' id='FldList_" + rowLength + "__UpdatedValue' value='" + currentValue + "' name='FldList[" + rowLength + "].UpdatedValue' ></td>"; 
    

    而这些输入是被变成剑道日期选取器日期:

    $('.datepicker').kendoDatePicker({ 
    
    }); 
    

    我现在面临的问题是日期弹出窗口出现在面板下方(或者任何在里面的东西)

    我试过这个:

    $('.datepicker').kendoDatePicker({ 
        //comment the beforeShow handler if you want to see the ugly overlay 
        open: function() { 
         setTimeout(function() { 
          $('.ui-datepicker').css('z-index', 8888); 
         }, 1); 
        } 
    }); 
    

    如果我通过调用 $('。datepicker').bob来破坏scipt,它会中断脚本并因此起作用(但显然也会打破其余的javascript功能。

    我也试过这样:

    $("input[type=date]").kendoDatePicker({ 
        open:function(e) 
         {     
          window.setTimeout(function(){ $(".k-calendar-container").parent(".k-animation-container").css("zIndex", "11000"); }, 1); 
         } 
        }); 
    

    我自己也尝试改变风格:

    position: relative; z-index: 100000; 
    

    现在我完全没了主意。

    有人能帮我吗?

    非常感谢

    编辑:

    我注意到,我使用jQuery的功能不会出现在所有设置Z-指数。我试图改变$('。ui-datepicker')。css('z-index',8888);到$('。k-calendar-container')。css('z-index',8888);但那也没用。我会不断更新,因为我觉得更多信息

    +0

    你能不能做反向,并尝试在面板上降低z-index的? – 2014-11-25 12:48:16

    +0

    根据Firebug的面板只有一个z-索引为5.所以不应妨碍。 我想知道如果这是溢出问题,但更改溢出不帮助(最好它在该面板上创建一个滚动条) – 2014-11-25 14:05:37

    +0

    好的。那么你还可以在FireBug的datepicker日历下拉列表中设置z-index,这样做有帮助吗?剑道的复杂性是嵌套元素的各种层次结构... – 2014-11-25 16:02:48

    回答

    0

    尝试关闭日期选择动画,看看是否有帮助:

    $('.datepicker').kendoDatePicker({ 
        //comment the beforeShow handler if you want to see the ugly overlay 
        open: function() { 
         $('.ui-datepicker').css('z-index', 8888); 
        }, 
        animation: { 
         open: { 
          duration: 0 
         } 
        } 
    }); 
    
    +0

    感谢您的回答,但这并不奏效。我刚刚注意到这个函数实际上并没有设置容器的z-Index。 – 2014-11-26 10:44:36

    相关问题