fix datepicker appears out of screen (#2610)
This commit is contained in:
@@ -48,6 +48,13 @@ export default class KimaiDateTimePicker extends KimaiPlugin {
|
||||
}
|
||||
});
|
||||
|
||||
jQuery(this).on('show.daterangepicker', function (ev, picker) {
|
||||
if (picker.element.offset().top - jQuery(window).scrollTop() + picker.container.outerHeight() + 30 > jQuery(window).height()) {
|
||||
picker.drops = 'up';
|
||||
picker.move();
|
||||
}
|
||||
});
|
||||
|
||||
jQuery(this).on('apply.daterangepicker', function(ev, picker) {
|
||||
jQuery(this).val(picker.startDate.format(localeFormat));
|
||||
jQuery(this).trigger("change");
|
||||
|
||||
Reference in New Issue
Block a user