Last active
August 6, 2025 10:41
-
-
Save wpmudev-sls/59c0b824430647ec7ad9dd0a4e05a131 to your computer and use it in GitHub Desktop.
[Forminator Pro] - Fix datepicker on popup maker popup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: [Forminator Pro] Fix datepicker on popupmaker | |
* Description: Fix datepicker on popupmaker. | |
* Author: Prashant @ WPMUDEV | |
* Task: SLS-7187 | |
* Author URI: https://premium.wpmudev.org | |
* License: GPLv2 or later | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly. | |
} | |
/** | |
* Fix popup maker datepicker. | |
*/ | |
function wpmudev_popupmaker_datepicker_fix() { | |
?> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($){ | |
$(document).on('pumAfterOpen', function(e){ | |
$(e.target).on('scroll', function () { | |
var inp = $(this).find('input.hasDatepicker:focus'); | |
$('#ui-datepicker-div').css('position', 'absolute'); | |
$('#ui-datepicker-div').css('top', inp.offset().top + inp.outerHeight()); | |
}); | |
}); | |
}); | |
</script> | |
<?php | |
} | |
add_action( 'wp_footer', 'wpmudev_popupmaker_datepicker_fix', 9999 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment