10

Bootstrap-datetimepicker is not working with jQuery 3.1.1. I need to use the same jQuery library to run all the other dependent functions.

4

2 回答 2

13

我得到同样的错误。

input.size is not a function TypeError

修改bootstrap-datetimepicker.js行号:2253

if (input.size() === {

if (input.length === 0) {

行号:2264

if (element.find('.datepickerbutton').size() === 0) {

if (element.find('.datepickerbutton').length === 0) {

添加CSS

.input-group.date .dropdown-menu{
     display: block;    
 }
于 2018-07-19T07:32:58.850 回答
11

根据文档,引导 datetimepicker 运行所需的文件是:

jQuery

Moment.js

引导程序.js

引导 CSS

引导日期选择器 CSS

语言环境:Moment 的语言环境文件

查看此小提琴并检查左侧的外部资源

像这样初始化

$('#datetimepicker1').datetimepicker();

我使用了以下文件:jQuery 3.1.1

时刻.js

bootstrap.min.css

bootstrap.min.js

引导-datetimepicker.min.css

引导-datetimepicker.min.js

此外,请阅读文档中的此安装帖子以获得更好的理解。

于 2016-12-20T07:29:07.743 回答