Twitter Bootstrap Datepicker within modal window

后端 未结 22 1680
旧时难觅i
旧时难觅i 2020-11-29 02:42

I am currently using the Twitter Bootstrap framework, and when using the modal windows I cannot get over js elements to work like datepicker or validation, though chosen and

相关标签:
22条回答
  • 2020-11-29 03:00

    can you change in your css file bootstrap-timepicker/css/bootstrap-timepicker.css

    from

    .bootstrap-timepicker-widget.dropdown-menu.open {
      display: inline-block;
    }
    

    to

    .bootstrap-timepicker-widget.dropdown-menu.open {
      display: inline-block;
      z-index:1151;
    }
    
    0 讨论(0)
  • 2020-11-29 03:00

    For BootsTrap Calender use this

    /The Calender Index CSS/

    .bootstrap-datetimepicker-widget {
       z-index:99999 !important;
    }
    
    0 讨论(0)
  • 2020-11-29 03:00
    // re initialze datepicker
    $(".bootstrap-datepicker").bsdatepicker({
        format: "yyyy-mm-dd",
        autoclose: true,
    }).on('changeDate', function (ev) {
        $(this).bsdatepicker('hide');
    });
    //
    $(".dropdown-menu").css({'z-index':'1100'});
    
    0 讨论(0)
  • 2020-11-29 03:01

    Add z-indez in class ui-datepicker

    <style>
        .ui-datepicker{ z-index:1151 !important; }
    </style>
    
    0 讨论(0)
  • 2020-11-29 03:01

    As mccannf said in his comment:

    I recommend you look at your bootstrap CSS and JS. Your modal is being set at a very high z-index value (99999). Just compare my jsfiddle above with yours

    0 讨论(0)
  • 2020-11-29 03:01

    Try with this piece of code.

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

    will solve the problem when you are using bootstrap V3

    0 讨论(0)
提交回复
热议问题