From 284f265008f3d592d9830ed4015fae127a51ef50 Mon Sep 17 00:00:00 2001 From: Kevin McCaw Date: Thu, 17 Sep 2015 15:49:45 -0600 Subject: [PATCH] Edited the noToggleMeridian method in the timepicker directive to correctly compare against 12 (instead of 13) when determining if the resulting time should be compared against the minimum or the maximum. If the selected time was after noon, the resulting time after toggling would be in the morning of the same day, and should be compared against the minimum and not the maximum. --- src/timepicker/timepicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timepicker/timepicker.js b/src/timepicker/timepicker.js index 42def45fcd..a89e6d8a4f 100644 --- a/src/timepicker/timepicker.js +++ b/src/timepicker/timepicker.js @@ -92,7 +92,7 @@ angular.module('ui.bootstrap.timepicker', []) }; $scope.noToggleMeridian = function() { - if (selected.getHours() < 13) { + if (selected.getHours() < 12) { return addMinutes(selected, 12 * 60) > max; } else { return addMinutes(selected, -12 * 60) < min;