简体   繁体   English

引导模式中的日期时间选择器,滚动

[英]Date time picker in bootstrap modal, scrolling

I have a problem when scrolling in bootstrap modal with the date time picker plugin. 使用日期时间选择器插件在引导程序模式中滚动时出现问题。 (not date picker). (不是日期选择器)。

When I am scrolling in modal, the date box stays fixed page, but normally it shouldn't do that 当我滚动模式时,日期框保持固定页面,但通常不应该这样做

Where is a lot solutions for bootstrap-datepicker, but I use bootstrap-datetimepicker , and I can't find a solution for it, or maybe I can't find it? bootstrap-datepicker的解决方案在哪里,但是我使用bootstrap-datetimepicker,却找不到解决方案,或者也许找不到?

Add position: relative; 添加position: relative; to the parent container. 到父容器。

I also had encountered the same problem, and my date time picker default is displayed below the input box, the separation of the input box and date time picker plug when slide the modal, the I can let the date time picker plug default display on the input box above, so my javascript code is: 我也遇到过同样的问题,我的日期时间选择器默认值显示在输入框下方,当滑动模态时输入框和日期时间选择器插头分开,我可以让日期时间选择器默认值显示在输入框上方,所以我的JavaScript代码是:

$('#datetimepicker').datetimepicker({
    #this is other option
    ...
    pickerPosition: 'top-right',
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM