数据采集器日历未以正确的位置打开 [英] Datetimepicker calendar is not open in correct position
问题描述
我在paramquery网格中使用Eonasdan bootstrap datetimepicker。从开始我面临一个问题,如果我打开datetimepicker,日历隐藏在网格内。当我给予css条件
I am using Eonasdan bootstrap datetimepicker in paramquery grid. From starting I have faced one problem, If I open datetimepicker, the calendar is hiding inside the grid. When I given the css condition
.dropdown-menu {
position: fixed;
}
它正常工作。日历是清晰可见的,但它不是在一个正确的地方开放。给定位置:固定后,如果我单击选择器图标,日历在网格的右上角或右下角打开。它不是在一个确切的地方开放。如何解决此问题?
it is working. The calendar is visible clearly but it is not open in a correct place. After given "position:fixed", If I click picker icon the calendar is open in right-top of the grid or right-bottom of the grid. It is not open in an exact place. How can I resolve this?
推荐答案
尝试使用Datepicker的widgetParent选项
$(。input-group.date)。datetimepicker({widgetParent:'body'});
Try using widgetParent option from Datepicker
$(".input-group.date").datetimepicker({ widgetParent: 'body'});
可以调整定位,widgetParent选项允许您在页面中的任何容器中显示窗口小部件。
Now you can adjust positioning, widgetParent option allow you to display the widget in any container in the page.
这篇关于数据采集器日历未以正确的位置打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!