我正在尝试使用DatePicker()
在我的HTML
页面中显示日历。我已经包含了适当的UI js文件,但它仍然没有向用户界面显示日历。 请帮忙。我无法弄清楚我究竟犯了什么错误。 日历未显示
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Project Information</title>
<script src="../jquery-1.11.0.js"></script>
<script src="../jquery-ui.js"></script>
<script src="../jquery-ui.min.js"></script>
<script src="../jquery.ui.datepicker.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
<script type="text/javascript">
$(document).ready(function(){
$("#datePicker").datepicker();
});
</script>
</head>
<body>
<form action="/projects/1" method="post">
<fieldset id="project_information">
<legend>Project Infomation</legend>
<ol>
<li><label for="priority">Project Name</label> <input
type="text" id="projectName" autofocus="autofocus"></li>
<li><label for="priority">Priority</label> <input type="range"
min="0" max="10" name="priority" value="0" id="priority"></li>
<li><label for="start_date">Start date</label> <input
type="text" name="start_date" id="start_date"
placeholder="YYYY-DD-MM" id="datePicker">
</li>
<li><input type="button" id="submit" value="clickMe"></li>
</ol>
</fieldset>
</form>
</body>
</html>
第一 dont add th他们俩。任何人。 –
控制台中的任何错误?此外,将脚本引用和内联脚本包含在文档末尾而不是头部已成为标准做法。 – Yuck
你忘了包含jQueryUI的样式表? – putvande