当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - JQuery DatePicker calendar does not appear

问题描述:

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

网友答案:

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

分享给朋友:
您可能感兴趣的文章:
随机阅读: