On a webpage, I have two combo boxes. The first has start times (hourly) from 9am to 9pm. The second has end times from 10am - 12pm.
The user selects a start time and an end time.
I would like to be able to have the second combo box show only those times later than the one selected in the first box.
For example, if a user choses a start time of 2pm the second combo box only shows times after and including 3pm.
I have absolutly no idea how to go about achiving this, I'm not even sure it can be done.
This is the code I have at the moment.
<div class="form-group">
<label class="control-label col-sm-3" for="bookingTime">Times of your booking</label>
<div class="col-sm-4">
<select class="form-control" name="bookingStartTime" id="bookingStartTime">
<option>Select start time</option>
<option value="9am">9 am</option>
<option value="10am">10 am</option>
<option value="11am">11 am</option>
<option value="12pm">12 pm</option>
<option value="1pm">1 pm</option>
<option value="2pm">2 pm</option>
<option value="3pm">3 pm</option>
<option value="4pm">4 pm</option>
<option value="5pm">5 pm</option>
<option value="6pm">6 pm</option>
<option value="7pm">7 pm</option>
<option value="8pm">8 pm</option>
<option value="9pm">9 pm</option>
</select>
</div>
<!-- /#bookingStartTime -->
<div class="col-sm-offset-1 col-sm-4">
<select class="form-control" name="bookingEndTime" id="bookingEndTime">
<option>Select finish time</option>
<option value="10am">10 am</option>
<option value="11am">11 am</option>
<option value="12pm">12 pm</option>
<option value="1pm">1 pm</option>
<option value="2pm">2 pm</option>
<option value="3pm">3 pm</option>
<option value="4pm">4 pm</option>
<option value="5pm">5 pm</option>
<option value="6pm">6 pm</option>
<option value="7pm">7 pm</option>
<option value="8pm">8 pm</option>
<option value="9pm">9 pm</option>
<option value="10pm">10 pm</option>
<option value="11pm">11 pm</option>
<option value="12pm">12 pm</option>
</select>
</div>
<!-- /bookingEndTime -->