mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
Fixed parent positioning bug
This commit is contained in:
parent
794e64b20f
commit
c3181ceb09
@ -1788,6 +1788,14 @@
|
||||
left = $(window).width() - datetimepicker[0].offsetWidth;
|
||||
}
|
||||
}
|
||||
var node = datetimepicker[0]
|
||||
do {
|
||||
node = node.parentNode;
|
||||
if(window.getComputedStyle(node).getPropertyValue('position') === 'relative' && $(window).width() >= node.offsetWidth) {
|
||||
left = left - (($(window).width() - node.offsetWidth)/2)
|
||||
break
|
||||
}
|
||||
} while(node.nodeName != 'HTML')
|
||||
datetimepicker.css({
|
||||
left: left,
|
||||
top: top,
|
||||
|
Loading…
Reference in New Issue
Block a user