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

Timepicker - leading zero is erased in hours during input, when pad-hours is set to true #6430

Closed enchained closed 7 years ago

enchained commented 7 years ago

Leading zero disappears, and then comes back after you clicked anywhere else. Try input '09' to my plunkr for example. Should it behave that way, or is it a bug? I'm having trouble using ui-mask because of this - it fails to detect 2 digits during input, and shows placeholder until I click anywhere else, and it looks confusing.

See the default and ui-mask timepickers here: https://plnkr.co/edit/iURaci7K3sHK8J9HzN49?p=preview

Here on the template update it doesn't pad the hours while you're editing the hours (when keyboardChange === 'h' ), no matter what pad-hours value is: $scope.hours = keyboardChange === 'h' ? hours : pad(hours, !padHours);

Is it on purpose, and why, or should it be fixed?

icfantv commented 7 years ago

Per the issue template, the issues forum is not for support requests. Please read the link contained therein for how to ask for, and receive, assistance. Thanks.