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

parentEl in initialSettings - How to use #239

Closed
mayurbangar opened this issue Jul 20, 2021 · 1 comment
Closed

parentEl in initialSettings - How to use #239

mayurbangar opened this issue Jul 20, 2021 · 1 comment

Comments

@mayurbangar
Copy link

Hi, I tried to use parentEl to render my daterangepicker within a specific div with id = 'my-div-id'

Different ways I tried
Passing a simple string 'my-div-id'
Passing a dom element using document.getElementById('my-div-id')
Passing a jquery element $('#my-div-id')

None of the above methods seem to work. Could anyone please share how do I use parentEl to render my daterangepicker as a child of a specific div.
initialSettings={{ startDate: state.startDate, endDate: state.endDate, ranges: state.ranges, opens: 'left', parentEl: parentEl }}

Thanks.

@mayurbangar
Copy link
Author

It works with $('#mydivid') without hyphens. Maybe I missed something here before.

Thanks.

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

No branches or pull requests

1 participant