Reputation: 13937
I put in a bootstrap formhelper timepicker inside my webapp however, I am having hardtime getting the time value from it
how to get the timevalue from bootstrap timepicker?
just doing data.time=$("#fromTimeText").val();
doesnt seem to work
http://vincentlamanna.com/BootstrapFormHelpers/timepicker.html
<div class="ltrClass bfh-timepicker" id="fromTimeText" style="text-align:center;">
<div class="bfh-timepicker-toggle rtlClass " id="pickupTime" data-toggle="bfh-timepicker">
<label for ="fromTimeText"></label>
<input type="text" id="fromTimeText" class="centralize" readonly>
<i class="icon-time"></i>
</div>
<div class="bfh-timepicker-popover" >
<table class="table">
<tbody>
<tr><td class="hour"><a class="next" href="#"><i class="icon-chevron-up"></i></a><br>
<input type="text" class="input-mini" readonly><br>
<a class="previous" href="#"><i class="icon-chevron-down"></i></a></td>
<td class="separator">:</td>
<td class="minute">
<a class="next" href="#"><i class="icon-chevron-up"></i></a><br>
<input type="text" class="input-mini" readonly><br>
<a class="previous" href="#"><i class="icon-chevron-down"></i></a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
Upvotes: 1
Views: 2264
Reputation: 1040
You've got duplicate IDs on both your div
and your input
. Change or remove the ID on your div
and you're all set.
Upvotes: 1