I must be an idiot. I've been trying to get the bootstrap datepicker to work for hours unsuccessfully. What do I need to write in the index.html to put up a simple 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>
Steps
Alternatively, you could:
<input data-provide="datepicker"> or the js method to call the datepicker $('.datepicker').datepicker()The docs have a bunch of other details on setting up things like date ranges etc. http://bootstrap-datepicker.readthedocs.org/en/release/
Where are you specifically getting stuck?
EDIT: it could be as basic as this:
<!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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With