angular-ui / bootstrap

PLEASE READ THE PROJECT STATUS BELOW. Native AngularJS (Angular) directives for Bootstrap. Smaller footprint (20kB gzipped), no 3rd party JS dependencies (jQuery, bootstrap JS) required. Please read the README.md file before submitting an issue!
http://angular-ui.github.io/bootstrap/
MIT License
14.29k stars 6.73k forks source link

uib-timepicker inconsistent disabled inputs with min and max times #6342

Open carterpayne opened 7 years ago

carterpayne commented 7 years ago

Bug description:

A uib-timepicker with a max time disables the input field when the up spinner button is disabled, while a timepicker with a min time does not disable the input field when the down spinner button is disabled. This is an issue when the time is set to now and the max is also set to now. The user cannot tab to the input field to change it. Their only option is to hit the down spinner button.

bootstrap/template/timepicker/timepicker.html: <input type="text" placeholder="HH" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementHours()" ng-blur="blur()">

The input field is disabled based only on if they are not able to increment the hours. Is this designed behavior?

Link to minimally-working plunker that reproduces the issue:

https://plnkr.co/edit/iOCOW1sQjM0EG1YS9Tc5?p=preview

Version of Angular, UIBS, and Bootstrap

Angular: 1.5.8 UIBS: 2.3.0 Bootstrap: 3.3.7

MGouaillier4CT commented 7 years ago

Hi ! I had this problem this week.

Here's the answer i found https://github.com/angular-ui/bootstrap/issues/6337

carterpayne commented 7 years ago

Thanks, that's a good work around. I'm leaving this issue open for now to see if the maintainers believe this is a real issue or intended functionality.