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
525 stars 227 forks source link

Form tags tabindex #209

Open ghost opened 7 years ago

ghost commented 7 years ago

First of all thanks for your work on this picker.

I got a problem with organizing my form input tabindexs. It seems that the picker overwrites the tabindex always with 0 (Line 303)

Why can't the value be inheritet?

Small Plunker Example for this behavior http://plnkr.co/edit/RYTDM3N9GbJpBZgqbaYR?p=preview

Hasan-git commented 6 years ago

I have the same issue

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 :)