问题
I am using MultiDatesPicker for jQuery UI, but the datepicker is not showing. Please help.
Here with my code:
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="Multiple-Dates-Picker-for-jQuery-UI-latest/jquery-ui.multidatespicker.css">
<script src="Multiple-Dates-Picker-for-jQuery-UI-latest/jquery-ui.multidatespicker.js"></script>
<script>
$(document).ready(function(){
$('#mdp-demo').multiDatesPicker();
});
</script>
<style>
body { height: 400px; }
</style>
</head>
<body>
<input id="mdp-demo">
</body>
</html>
回答1:
As shown in the Input field usage example you have to include
- jquery.min.js (2.2.4)
- jquery-ui.multidatespicker.css
- jquery-ui.css
- jquery-ui.multidatespicker.js
- jquery-ui.min.js
Example (copied from the link above)
$( document ).ready(function() {
$('#mdp-demo').multiDatesPicker();
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<link href="https://cdn.rawgit.com/dubrox/Multiple-Dates-Picker-for-jQuery-UI/master/jquery-ui.multidatespicker.css" rel="stylesheet"/>
<link href="https://code.jquery.com/ui/1.12.1/themes/pepper-grinder/jquery-ui.css" rel="stylesheet"/>
<script src="https://cdn.rawgit.com/dubrox/Multiple-Dates-Picker-for-jQuery-UI/master/jquery-ui.multidatespicker.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<input id="mdp-demo">
回答2:
You have not included style sheet link for date picker get style link from documentation hopefully it will solve your problem if not letme know
来源:https://stackoverflow.com/questions/57527634/multidatespicker-for-jquery-ui-is-not-showing