Skip to content

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

- Make suggested fix as per CR

Fixes angular-ui#1598
Relates to angular-ui#2639
Closes angular-ui#3533
  • Loading branch information
wesleycho authored and chrisirhc committed Apr 14, 2015
1 parent 31a6802 commit 6324486
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/timepicker/timepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ angular.module('ui.bootstrap.timepicker', [])
}

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

Expand Down

0 comments on commit 6324486

Please sign in to comment.