JQuery DatePicker calendar does not appear

梦想的初衷 提交于 2019-12-25 18:54:49

问题


On click in my input calendar don't appear.... this is my code js...

<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script>
<script>
   $(function() {
     $("#dp1").datepicker();
   });
 </script>

and this is my html

<input type="text" id="dp1">

i thing i've imported wrong files... any suggest? ty


回答1:


Include jquery ,jquery ui only work with jquery

  <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> 
  <link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/smoothness/jquery-ui.css" />
  <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script>
 <script>
  $(function() {
   $("#dp1").datepicker();
 });
</script>

Fiddle



来源:https://stackoverflow.com/questions/25784944/jquery-datepicker-calendar-does-not-appear

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!