Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need option to set tabindex of input element #53

Closed
dockleryxk opened this issue Jan 16, 2019 · 1 comment · Fixed by #54
Closed

Need option to set tabindex of input element #53

dockleryxk opened this issue Jan 16, 2019 · 1 comment · Fixed by #54

Comments

@dockleryxk
Copy link
Contributor

It would be great to be able to set the tabindex if needed. Currently, tabindex is always 0.

@dockleryxk
Copy link
Contributor Author

If anyone else is waiting for the PR like me, a workaround is as follows in your component:

constructor(
    private renderer: Renderer2,
    @Inject(DOCUMENT) private document: any,
  ) { }

ngAfterViewInit() {
    // tabindex hack until ng2-flatpickr takes my PR
    this.renderer.setAttribute(this.document.getElementsByClassName('ng2-flatpickr-input flatpickr-input form-control input')[0], 'tabindex', 'tabindex-here');
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant