I am trying to get time value from bootstrap timepicker . There are two forms within a table row.
The first form is
<tr>
<form class="form-inline" id ="form1">
<td>
<div class="input-group bootstrap-timepicker timepicker">
<input id="" type="text" class="in_timepicker form-control input-small">
</div>
</td>
<td>
<div class="input-group bootstrap-timepicker timepicker">
<input id="" type="text" class="out_timepicker form-control input-small">
</div>
</td>
<td>
<button class="btn btn-md btn-danger btnupdate" id="">Update</button>
</td>
</form>
</tr>
and the second form is
<tr>
<form class="form-inline" id ="form2">
<td>
<div class="input-group bootstrap-timepicker timepicker">
<input id="" type="text" class="in_timepicker form-control input-small">
</div>
</td>
<td>
<div class="input-group bootstrap-timepicker timepicker">
<input id="" type="text" class="out_timepicker form-control input-small">
</div>
</td>
<td>
<button class="btn btn-md btn-danger btnupdate" id="">Update</button>
</td>
</form>
</tr>
The javascript code is
$('.in_timepicker').timepicker({
minuteStep: 5,
showInputs: false,
disableFocus: true,
defaultTime: false
});
$('.out_timepicker').timepicker({
minuteStep: 5,
showInputs: false,
disableFocus: true,
defaultTime: false
});
$("body").on("click", ".btnupdate", function () {
var intime = $(this).parent().siblings().children().children('.in_timepicker').val();
});
I am trying to get the intime value from both of the forms separately and I have written what i have tried but I am still not successful .Please suggest ways to do it.