Page 1 of 1
VanillaJS Datepicker in subform
Posted: Tue Oct 01, 2024 2:43 pm
by vario
I have a subform with date fieldsthat occupies a narrow portion of the form, and the new datepicker is not visible when in the last row (at bottom of subform). I have to scroll down after I've clicked on the date field in order to see the picker. Can it be made to display "always on top"?
Re: VanillaJS Datepicker in subform
Posted: Tue Oct 01, 2024 11:19 pm
by steven
vario,
Is this what you mean?
bef.png
And you want this?
aft.png
Until this is updated on GitHub you can add this to nuBuilder's JavaScript in nuform.js ...
fixed.png
Code: Select all
setCalendarTop();
}
function setCalendarTop(){
var $innerDiv = $('.datepicker');
var offset = $innerDiv.offset();
// Move the div to the body
$innerDiv.appendTo('body');
// Apply the position
$innerDiv.css({position: 'absolute', top: offset.top, left: offset.left});
}
Steven
Re: VanillaJS Datepicker in subform
Posted: Wed Oct 16, 2024 8:24 am
by vario
Yes thanks, that's exactly what I wanted.
Re: VanillaJS Datepicker in subform
Posted: Wed Oct 23, 2024 5:39 am
by kev1n
Fix is on Github now.