I have a table where i have to use a bootstrap calendar in a particular columns in all the rows. Using a id for that calendar could be cumbersome. So i decided to assign a class to all the calendar and tried accessing the calendar but unfortunately it doesn't pop-up. While the same code when hard-coded with the id's work perfectly. Here is the code snippet i am using:-
<script>
$(document).ready(function() {
$(".datepicker").datepicker({
autoclose: true,
startDate: new Date()
});
});
</script>
<td>
<div class="form-group">
<div class="input-group datepicker date">
<input type="text" class="form-control" />
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
</td>