I am using the bootstrap-timepicker for rails and I am using it in a form helper. It works very well if there is only one instance of it. Here is a code fragment:
<div class="bootstrap-timepicker input-append span2 offset0">
<%= f.label :to_hour %>
<input id="timepicker1" type="text" class="input-small" value='12:15 PM'>
<span class="add-on"><i class="icon-time"></i></span>
</div>
However it doesn't work when there are multiple instances of it in a single page. Essentially I have multiple dynamic rows of data that require a time picker each and the examples that I have found were simple and had a unique input id and corresponding javascript.
Does anyone know how I can make this dynamic or know of any examples that demonstrates this?