我对此相当陌生,所以请耐心等待...我正在使用教程@ http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/index.html 允许用户从中选择日期日历
但是我似乎无法让它工作,如果我以错误的方式处理这个问题,请有人告诉我......
'jquery.datePicker.js & datePicker.css' 可以在页面顶部附近下载... http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/index.html
- 在我的视图中复制我的标签内的“•jquery.datePicker.js”中的代码
- 将 datePicker.css 代码复制到我的 css 文件中
将以下内容粘贴到我的视图页面顶部:
<!-- jQuery --> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <!-- required plugins --> <script type="text/javascript" src="scripts/date.js"></script> <!--[if IE]><script type="text/javascript" src="scripts/jquery.bgiframe.js"></script><![endif]--> <!-- jquery.datePicker.js --> <script type="text/javascript" src="scripts/jquery.datePicker.js"></script>
这不起作用...iv尝试进行第一个演示并使用替换我的<script>
标签中的.js数据
$(function()
{
$('.date-pick').datePicker();
});
and then adding the following to .css
/* located in demo.css and creates a little calendar icon
* instead of a text link for "Choose date"
*/
a.dp-choose-date {
float: left;
width: 16px;
height: 16px;
padding: 0;
margin: 5px 3px 0;
display: block;
text-indent: -2000px;
overflow: hidden;
background: url(calendar.png) no-repeat;
}
a.dp-choose-date.dp-disabled {
background-position: 0 -20px;
cursor: default;
}
/* makes the input field shorter once the date picker code
* has run (to allow space for the calendar icon
*/
input.dp-applied {
width: 140px;
float: left;
}
有人可以告诉我我做错了什么吗?