【发布时间】:2014-03-12 00:15:57
【问题描述】:
我正在使用这个仓库: https://github.com/eternicode/bootstrap-datepicker
我为日期选择器选择了我想要的功能并使用了所有正确的库。当我单击框查找图标以显示日历下拉列表时,没有任何反应。并且在使用 firefox 时,在 firebug 中不会报告任何错误。有人可以指出问题所在吗?
tahnks
顺便说一句,在日期选择器网站上,我选择了“组件”作为类型。所以当我指的是盒装图标时,你知道我在说什么。
代码如下:
<!DOCTYPE html>
<html lang="en">
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<link id="bsdp-css" href="http://eternicode.github.io/bootstrap-datepicker/css/datepicker3.css" rel="stylesheet">
<script src="http://eternicode.github.io/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
</head>
<body>
<div class="input-group date" style="width:400px;">
<input type="text" class="form-control"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
</div>
<script type="text/javascript">
$(function(){
$('#sandbox-container .input-group.date').datepicker({
format: "mm/dd/yy",
minViewMode: 1,
autoclose: true,
todayHighlight: true
});
});
</script>
</body>
</html>
【问题讨论】:
标签: javascript jquery twitter-bootstrap datepicker