What I’m trying to do:
My are reporting an issue, where the DatePicker component opens in a position, which makes some of the widget go out-out-bounds of the browser window.
No scrollbar appears, so it is not possible to reach the buttons.
Screenshot from my attempt to recreate the issue:
My users are telling me, that it can get so bad that half of the widget is not visible.
A temporary solution, is to zoom out in the browser, but I need a long term solution.
What I’ve tried and what’s not working:
After browsing the forums, and stackoverflow, I found something, that may be a solution, by editing the pickerPosition
attribute of the component:
anvil.js.call('position_datepicker')
function position_datepicker() {
$('.daterangepicker').pickerPosition("top-left");
};
I can not get it to work - either because I cam not accessing the correct DOM element, or I have the javascript function wrong.
Any suggestions on how to fix the issue?
Either by making the component open “upwards”, or by ensuring, that the componet stays within the browser window.