Q:

jQuery Timepicker and jQuery Datepair: How to set end time into 15mins

I'm using jQuery timepicker and jQuery datepair
here's my html code
<p id="timeOnlyExample">
    <input type="text" class="time start" /> to
    <input type="text" class="time end" />
</p>
and my jQuery code
$('#timeOnlyExample .time').timepicker({
    'showDuration': true,
    'timeFormat': 'g:ia'
});
var timeOnlyExampleEl = document.getElementById('timeOnlyExample');
var timeOnlyDatepair = new Datepair(timeOnlyExampleEl);
So the output of this code is: for example I choose 1:00am in the time start and the output of time end is 2:00pm so the time interval is 1 hour.
But I want to do is when I choose 1:00am in the time start I want the output in the time end is 1:15am 15 mins interval. I'm searching right now for the solution but I think there is someone who can help me in this problem. Thanks

A:

You can use interval option.
$('#timeOnlyExample .time').timepicker({
    'showDuration': true,
    'timeFormat': 'g:ia',
    'interval': 15 // 15 minutes
});

More details at : http://timepicker.co/options/
You should initialize the datepair with defaultTimeDelta .
var timeOnlyDatepair = new Datepair(timeOnlyExampleEl, {
  'defaultTimeDelta': 15*60*1000 // milliseconds
});

