clockpicker
clockpicker copied to clipboard
it can't visible in bootstrap modal window
clock picker can't displaying inside bootstrap modal popup window, it showing modal overlay behind..
It can be fixed with this style:
.popover.clockpicker-popover{
z-index: 1050;
}
.clockpicker-popover { z-index: 999999 !important; }
we need a dynamic z-index, otherwise, the clockpicker z-index always be max. if the clockpicker in bootstrap modalA, then we open the modalB, we can find the clockpicker show in modalB. This is a problem.
add this to bootstrap-clockpicker.js
//resolved Clock appearing behind bootstrap modal var parentsZindex = []; element.parents().each(function(){ var itemZIndex = $(this).css('z-index'); if (itemZIndex !== 'auto' && itemZIndex !== 0) parentsZindex.push(parseInt(itemZIndex)); }); var zIndex = Math.max.apply(Math, parentsZindex) + 1; popover.css({ zIndex: zIndex })