indrimuska / angular-moment-picker

Angular Moment Picker is an AngularJS directive for date and time picker using Moment.js.
http://indrimuska.github.io/angular-moment-picker/
MIT License
527 stars 229 forks source link

input tabindex #266

Open Hasan-git opened 5 years ago

Hasan-git commented 5 years ago

Hello,

input tabindex tag is always set to 0

hugobaes commented 5 years ago

Same here! I think the problem is on this line: https://github.com/indrimuska/angular-moment-picker/blob/master/src/directive.ts#L303

SylwesterBzdyl commented 1 year ago

I have a solution if you are trying to prevent tabbing into the picker. The problem is that the keyboard option is never taken into the account when input attribute is added. It will always be 0 regardless of keyboard set to true or false. You can change the source code (line 505 for me but I've seen some files where it's line 303) to this: $scope.input.addClass('moment-picker-input').attr('tabindex', $scope.keyboard ? 0 : -1);

Hope that helps :)