trentrichardson/jQuery-Timepicker-Addon — Issue #295: setTime() ignores am/pm
Author: jdufresne
Created: 2012-01-03 20:00:00+00:00
State: open

jquery version: 1.7.1
jquery-ui version: 1.8.16
timepicker version: 0.9.8

When using `setTime()` and `ampm` is `true`, setting a time past 12:00 always results in am.

Test case:

@@@

test

@@@

@@@
$(document).ready(function() {
$('input').timepicker({ampm: true});
$('#first').change(function() {
var el = $(this);
var date = el.datepicker('getDate');
date.setMinutes(date.getMinutes() + 60);
$('#second').timepicker('setTime', date);
});
});
@@@