use*_*281 3 jquery datepicker twitter-bootstrap
我一定是个白痴.我一直试图让bootstrap datepicker工作几个小时失败.我需要在index.html中编写什么来建立一个简单的datepicker?
<html>
<head><title>A concrete example I will upload to github for future people</title>
<!-- What exactly do I need to include here? There's /js/bootstrap-datepicker.js -->
</head>
<body>
Datepicker:
<!-- The documentation says <input type="text" type="text" class="form-control"> -->
</body></html>
Run Code Online (Sandbox Code Playgroud)
脚步
或者,您可以:
<input data-provide="datepicker">或js方法调用datepicker$('.datepicker').datepicker()这些文档还有一些关于设置日期范围等内容的其他细节.http://bootstrap-datepicker.readthedocs.org/en/release/
你哪里被卡住了?
编辑:它可以像这样基本:
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="plugins/bootstrap-datepicker-master/css/datepicker3.css">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-12">
<input data-provide="datepicker">
</div>
</div>
</div>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="plugins/bootstrap-3.1.1-dist/js/bootstrap.min.js"></script>
<script src="plugins/bootstrap-datepicker-master/js/bootstrap-datepicker.js"></script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10281 次 |
| 最近记录: |