Datetimepicker calendar is not open in correct pos

2019-08-06 14:02发布

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?

http://i.stack.imgur.com/7f2zc.png

3条回答
Viruses.
2楼-- · 2019-08-06 14:45

I faced a similar problem where my date element in a table cell clipped the widget. I could not use my date element as the widget's DOM parent, but I still wanted to use it as a visual positioning.

I've submitted a PR with code to handle this. I've added a new option: forceElementPosition. It allows DOM parenting by widgetParent, but positioning next to the input element.

https://github.com/Eonasdan/bootstrap-datetimepicker/pull/1647

查看更多
戒情不戒烟
3楼-- · 2019-08-06 14:48

Try using widgetParent option from Datepicker $(".input-group.date").datetimepicker({ widgetParent: 'body'});

Now you can adjust positioning, widgetParent option allow you to display the widget in any container in the page.

查看更多
ゆ 、 Hurt°
4楼-- · 2019-08-06 14:51

Please remove your overflow:hidden

.pq-grid td.pq-grid-cell{overflow:hidden}

Replace this:-

.pq-grid td.pq-grid-cell{overflow:visible}

Demo

查看更多
登录 后发表回答