Skip to content

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
Development

Successfully merging this pull request may close these issues.

1 participant