问题
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