I am creating dynamic textboxes using AngularJS. I want a datepicker to show on every textbox.
Here is my angular code
<tr ng-repeat="shift in shifts">
<td>
<input type="text" ng-model="shift.ShiftName" />
<td>
<div class="input-append bootstrap-timepicker">
<input type="time" ng-model="shift.StartsAt" />
</div>
<td>
<div class="input-append bootstrap-timepicker">
<input type="time" ng-model="shift.EndsAt" />
</div>
</td>
<td><a href="#" class="btn btn-danger" ng-click="removeShift(shift.ShiftId)"><span class="icon-remove icon-white"></span>Remove</a></td>
</tr>
Normally, if it was a static textbox, I would include a datepicker like this:
$("#textbox").datepicker();
However, my textboxes are dynamic, so I cannot use this technique here.
I tried specifying a class to all the textboxes and then use the jQuery datepicker function, but I could not show the datepicker.