Bootstrap datetimepicker is not a function

前端 未结 4 1982
余生分开走
余生分开走 2020-12-10 10:28

I am trying to use the datetimepicker from http://eonasdan.github.io/bootstrap-datetimepicker/ and I am getting the error \"Uncaught TypeError: $(...).datetimepicker is not

4条回答
  •  生来不讨喜
    2020-12-10 10:59

    I changed the import sequence without fixing the problem, until finally I installed moments and tempus dominius (Core and bootrap), using npm and include them in boostrap.js

    try {
    window.Popper = require('popper.js').default;
    window.$ = window.jQuery = require('jquery');
    require('moment'); /*added*/
    require('bootstrap');
    require('tempusdominus-bootstrap-4');/*added*/} catch (e) {}
    

提交回复
热议问题