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

Raise an event, so other layout can happen if needed #2179

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

phayman
Copy link

@phayman phayman commented Mar 8, 2021

Raise an event, so other layout can happen if needed

I've used this myself to move the picker back in the bounds of the scrollable page.
ele.on('moved.daterangepicker', function (ev, picker) { let top = picker.container.offset().top; let height = picker.container.outerHeight(); let windowHeight = $(window).height() if (top < 0) { $(picker.container).css({ top: '20px' }); } else if (top + height > windowHeight) { $(picker.container).css({ top:${windowHeight - height - 20}px }); } });

Raise an event, so other layout can happen if needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant