我试图在输入区域添加Bootstrap 日期选择器,但我无法对其进行配置:
我使用他们的演示页面生成代码并尝试了它,但似乎我遗漏了一些东西请帮我解决这个问题。
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link href="../files/css/bootstrap.min.css" rel="stylesheet">
<link href="http://eternicode.github.io/bootstrap-datepicker/bootstrap-datepicker/css/datepicker3.css" rel="stylesheet">
<script src="../files/js/jquery.min.js"></script>
<script src="../files/js/bootstrap.js"></script>
<script src="http://eternicode.github.io/bootstrap-datepicker/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
</head>
<body>
<div class="input-group date">
<input type="text" class="form-control"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
</div>
<script>
$('#sandbox-container .input-group.date').datepicker({
format: "yyyy/mm/dd",
startDate: "2012-01-01",
endDate: "2015-01-01",
todayBtn: "linked",
autoclose: true,
todayHighlight: true
});
</script>
</body>
</html>