Soulipsyz Soulipsyz - 5 days ago 5
jQuery Question

Bootstrap datepicker not working at all

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>




Answer
$(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! :-)

Comments