Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
feat(timepicker): always pad minutes
Browse files Browse the repository at this point in the history
- Always pad minutes as a UX improvement
  • Loading branch information
wesleycho committed Apr 12, 2015
1 parent 09cf058 commit d4cf77d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/timepicker/test/timepicker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ describe('timepicker directive', function () {
var el = getMinutesInputEl();

changeInputValueTo(el, 9);
expect(getTimeState()).toEqual(['02', '9', 'PM']);
expect(getTimeState()).toEqual(['02', '09', 'PM']);
expect(getModelState()).toEqual([14, 9]);

el.blur();
Expand Down
2 changes: 1 addition & 1 deletion src/timepicker/timepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ angular.module('ui.bootstrap.timepicker', [])
}

$scope.hours = keyboardChange === 'h' ? hours : pad(hours);
$scope.minutes = keyboardChange === 'm' ? minutes : pad(minutes);
$scope.minutes = pad(minutes);
$scope.meridian = selected.getHours() < 12 ? meridians[0] : meridians[1];
}

Expand Down

0 comments on commit d4cf77d

Please sign in to comment.