I've been trying to get bootstrap datepicker from here: https://github.com/eternicode/bootstrap-datepicker to work but the calender won't show up at all. Not sure what I'm missing? I've linked everything correctly. Any help would be great, thanks!
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/datepicker.css" rel="stylesheet">
<input type="text" value="02/16/12" data-date-format="mm/dd/yy" class="datepicker" >
<script src="js/bootstrap.js"></script>
<script src="js/jquery-1.7.1.js"></script>
<script src="js/bootstrap-datepicker.js"></script>
<script type="text/javascript">
$('.datepicker').datepicker();
</script>
$(document).ready(function() {
$('.datepicker').datepicker();
})
It works on here I used jQuery 1.7.2, Bootstrap 2.0.2 and the latest datepicker JS. CSS is missing in my test, but the datepicker occurs on click! :-)
You need to load jquery before you load bootstrap.js, in addition to adding the $(document).ready().
<script src="js/jquery-1.7.1.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/bootstrap-datepicker.js"></script>
Hope that helps.
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