Uncaught bootstrap-datetimepicker requires Moment.js
引用Bootstrap 3 Datepicker插件时出现以下错误:
Uncaught bootstrap-datetimepicker requires Moment.js to bootstrap-datetimepicker.js:49 be loaded first
解决方案:
在使用bootstrap-datetimepicker相关函数时,先引入moment.js这个文件。
https://github.com/moment/moment/
下载,加入相应的js文件到项目中:
在BundleConfig.cs类中添加打包压缩:
实现效果: