Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery typeerror inst是未定义的日期选择器_Jquery_Datepicker - Fatal编程技术网

Jquery typeerror inst是未定义的日期选择器

Jquery typeerror inst是未定义的日期选择器,jquery,datepicker,Jquery,Datepicker,我使用datepicker在mvc的文本框中显示数据,但它给出了错误 typeerror inst是未定义的日期选择器 这是代码 <script> jQuery(function () { jQuery("#dd").datepicker(); }); </script> jQuery(函数(){ jQuery(“#dd”).datepicker(); }); 您应该包括jquery库和datepicker js 示例代码如下所示 &l

我使用datepicker在mvc的文本框中显示数据,但它给出了错误

typeerror inst是未定义的日期选择器

这是代码

<script>
    jQuery(function () {
        jQuery("#dd").datepicker();
    });
</script>

jQuery(函数(){
jQuery(“#dd”).datepicker();
});

您应该包括jquery库和datepicker js

示例代码如下所示

<html lang="en">
<head>
  <meta charset="utf-8">
  <title>jQuery UI Datepicker - Default functionality</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">
  <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  <script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
  <script>
  $(function() {
    $( "#datepicker" ).datepicker();
  });
  </script>
</head>
<body>

<p>Date: <input type="text" id="datepicker"></p>


</body>
</html>

jQuery UI日期选择器-默认功能
$(函数(){
$(“#日期选择器”).datepicker();
});
日期:


别忘了在你的页面上添加jquery和jqueryui引用。你能给我发送链接,我已经使用过了,但它显示errorTypeError:$(…)。datepicker不是函数TypeError:$(…)。datepicker不是函数行2>根据你提到的错误,评估行3,jquery datepicker.js可能不包含在您的页面中。请提供代码$(函数(){$(“#datepicker”).datepicker();});请检查页面(ctrl+I)并验证您包含的这些页面是否确实存在。请在浏览器(ctrl+U)中检查您的源代码。单击您提供的所有脚本是否都能正常工作。嘿,Manoj。您是否使用了与其他任何地方的Datepicker相同的ID??然后这个问题就出现了。。请检查一下