jquery-datetextentry
jquery-datetextentry copied to clipboard
missing tabindex functionality
Awesome plugin! Please consider adding something like the following to the end of the DateTextInput creation so it will take on the tabindex of the it replaces.
if (this.dte.$element.attr("tabindex")) { this.$input.attr('tabindex', this.index + parseInt(this.dte.$element.attr("tabindex"))); }
Thx!
REVISION 11.17.2015! Actually, it may be better to set the tabindex to the same values on all three inputs (not adding "this.index" to the element's tabindex). This way, the three inner text inputs will have the same taindex, so source(DOM) order will determine their tabbing order, and that should be normal left to right... and, the parent form/page will not have to accomodate with gaps in the tabindex at design time. So, proposed code is just: if (this.dte.$element.attr("tabindex")) { this.$input.attr('tabindex', parseInt(this.dte.$element.attr("tabindex")));
So your proposal is to simply propagate the tabindex value from the original input if it has one to all three input elements in the generated widget? That sounds like a reasonable approach and I'd be happy to look at a pull request if you want to provide one.