Jquery date picker z-index issue

前端 未结 14 2065
傲寒
傲寒 2020-12-02 12:57

I have a slideshow div, and I have a datepicker field above that div.

When I click in the datepicker field, the datepicker panel show behind slideshow div.

相关标签:
14条回答
  • 2020-12-02 13:32

    Put the following style at the 'input' text element: position: relative; z-index: 100000;.

    The datepicker div takes the z-index from the input, but this works only if the position is relative.

    Using this way you don't have to modify any javascript from jQuery UI.

    0 讨论(0)
  • 2020-12-02 13:32

    That what solved my problem:

     $( document ).ready(function() {   
        $('#datepickerid').datepicker({
         zIndexOffset: 1040 #or any number you want
         });
    });
    
    0 讨论(0)
提交回复
热议问题