Skip to content

Instantly share code, notes, and snippets.

@wpmudev-sls
Last active August 6, 2025 10:41
Show Gist options
  • Save wpmudev-sls/59c0b824430647ec7ad9dd0a4e05a131 to your computer and use it in GitHub Desktop.
Save wpmudev-sls/59c0b824430647ec7ad9dd0a4e05a131 to your computer and use it in GitHub Desktop.
[Forminator Pro] - Fix datepicker on popup maker popup
<?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