【发布时间】:2018-11-07 05:04:47
【问题描述】:
我正在开发一个网站:http://parishes.rcda.org:81/christtheking/ECC.php
如果我单击链接来安排访问(页面中间白色区域的左下方),则会在模式窗口中打开一个表单。
如果我点击“你想什么时候来参观?”的文本框,日期选择器不会加载。
我检查了 Firefox 中的开发者工具,发现一个错误告诉我:
jQuery.Deferred exception: $(...).datepicker is not a function @http://parishes.rcda.org:81/christtheking/ECC.php#popup3:745:29
l@https://code.jquery.com/jquery-3.3.1.min.js:2:29373
a/</c<@https://code.jquery.com/jquery-3.3.1.min.js:2:29677
undefined jquery-3.3.1.min.js:2:30920
TypeError: $(...).datepicker is not a function[Learn More] ECC.php:745:29
<anonymous>
http://parishes.rcda.org:81/christtheking/ECC.php:745:29
l
https://code.jquery.com/jquery-3.3.1.min.js:2:29373
a/</c<
https://code.jquery.com/jquery-3.3.1.min.js:2:29677
我不确定这是否是因为该网站使用 bootstrap 和 jquery 并且我的版本正确。
我确实检查了日期选择器调用脚本中的字段名称是否正确。
$(function () {
$("#visitDate").datepicker();
});
【问题讨论】:
-
你加载 jquery UI 了吗?
-
jquery 库在您的文档中加载了两次。先纠正这个...
-
我检查了我的代码并删除了一组 Jquery 加载语句。我现在只有:
标签: jquery bootstrap-4