日期分页器在日期单击时抛出未捕获的类型错误

时间:2017-10-31 23:58:24

标签: jquery html css twitter-bootstrap jquery-ui

您好我正在使用Bootstrap Date Paginator创建分页向导。它显示的是UI但是当我点击任何日期时它会抛出错误

jquery-ui.min.js:10 Uncaught TypeError: Cannot read property 'empty' of undefined
at n._updateDatepicker (jquery-ui.min.js:10)
at HTMLElement.<anonymous> (jquery-ui.min.js:10)
at Function.each (jquery-1.11.3.min.js:2)
at m.fn.init.each (jquery-1.11.3.min.js:2)
at m.fn.init.e.fn.datepicker (jquery-ui.min.js:10)
at DatePaginator._render (bootstrap-datepaginator.js:337)
at DatePaginator._init (bootstrap-datepaginator.js:126)
at new DatePaginator (bootstrap-datepaginator.js:31)
at HTMLDivElement.<anonymous> (bootstrap-datepaginator.js:426)
at Function.each (jquery-1.11.3.min.js:2)

jquery-ui.min.js:10 Uncaught TypeError: Cannot read property 'apply' of undefined
at HTMLElement.<anonymous> (jquery-ui.min.js:10)
at Function.each (jquery-1.11.3.min.js:2)
at m.fn.init.each (jquery-1.11.3.min.js:2)
at m.fn.init.e.fn.datepicker (jquery-ui.min.js:10)
at DatePaginator._render (bootstrap-datepaginator.js:257)
at DatePaginator._select (bootstrap-datepaginator.js:208)
at DatePaginator._clickedHandler (bootstrap-datepaginator.js:182)
at HTMLDivElement.e (jquery-1.11.3.min.js:2)
at HTMLDivElement.dispatch (jquery-1.11.3.min.js:4)
at HTMLDivElement.r.handle (jquery-1.11.3.min.js:4)

Date Paginator UI 我的代码是:

      $(document).ready(function(){

        var currDate = new Date();
        var options = {
                      selectedDateFormat: 'YYYY-MM-DD',
                      selectedDate: moment(currDate).format('YYYY-MM-DD'),

                     };

         $('#paginator').datepaginator(options);
       });

       CSS: <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepaginator/1.1.0/bootstrap-datepaginator.css" />
       JS: <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepaginator/1.1.0/bootstrap-datepaginator.js"></script>
           <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.2.0/js/bootstrap-datepicker.js"></script>

有人知道它为什么会抛出错误吗?

是否可能是jquery-ui.min.js版本的滥用。

提前感谢

0 个答案:

没有答案