How to set end time based on the third value?
Hello everyone, I'm trying to get my end time drop down values based on the length of meeting that I can pick. So my code look like this:
<tr>
<th>Start:</th>
<td><input type="text" id="start" name="start"/></td>
</tr>
<tr>
<th>Length of meeting</th>
<td>
<select name="meeting" id="meeting" onClick="interval()">
<option value="">--Select length--</option>
</select>
</td>
</tr>
<tr>
<th>End:</th>
<td><input type="text" id="end" name="end"></td>
</tr>
<script>
$(function() {
$('#start').timepicker({
'minTime':'8:00 AM',
'maxTime':'9:00 PM'
});
$('#end').timepicker({
'minTime':'8:00 AM',
'maxTime':'9:00 PM',
'step':???(how to pass my value from meeting dropdown here?)
});
});
</script>
So I can pick start time, then I can pick the length of my meeting that is created dynamically and then I should get my end time. Intervals of my meetings are from 5 to 60 min. So if I pick my start time 8:00am and my meeting length 15min, I should get my end time in intervals of 15min. So my first value in end dropdown will be 8:15am, then 8:30am and so on. For now I was able to hard code mt value in end timepicker 'step':15. What I need is that I want to pass my meeting length value and that way increment my end time. If anyone can help with this I would appreciate. Thanks in advance.