I am having trouble figuring out how to extract the start and end from a date and time range picker that I typically use data-link-field="dtp_input1"
to fetch the data to insert into a table as shown in this code snippet:
<input type="hidden" id="dtp_input1" name="date" value="" /><br/>
Now, my code for the date and time range picker looks like this:
<div class="form-group">
<label>Date and time range:</label>
<div class="input-group">
<div class="input-group-addon"> <i class="fa fa-clock-o"></i>
</div>
<input type="text" class="form-control pull-right" id="reservationtime">
</div>
<!-- /.input group -->
</div>
<!-- /.form group -->
And for the corresponding javascript:
$('#reservationtime').daterangepicker({
timePicker: true,
timePickerIncrement: 30,
format: 'MM/DD/YYYY h:mm A'
});
Please refer to my screenshot.
How can I write the code to retrieve the start and end times and store them in a MySQL database?