Uncaught bootstrap-datetimepicker requires Moment.js

引用Bootstrap 3 Datepicker插件时出现以下错误: 

Uncaught bootstrap-datetimepicker requires Moment.js to bootstrap-datetimepicker.js:49 be loaded firs

Uncaught bootstrap-datetimepicker requires Moment.js

解决方案: 
在使用bootstrap-datetimepicker相关函数时,先引入moment.js这个文件。 
https://github.com/moment/moment/ 
下载,加入相应的js文件到项目中: 


Related Posts

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注