| Server IP : 192.185.180.161 / Your IP : 216.73.216.153 Web Server : Apache System : Linux simka.websitewelcome.com 5.14.0-687.39.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Aug 18 06:09:16 EDT 2026 x86_64 User : xstream ( 1368) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home2/xstream/public_html/wp-content/plugins/gravityforms/js/ |
Upload File : |
/**
* Apply legacy options to DatePickers within Legacy Forms.
*/
gform.addFilter( 'gform_datepicker_options_pre_init', function( optionsObj, formId, inputId, $element ) {
var gf_legacy = window.gf_legacy_multi;
if ( ! gf_legacy ) {
return optionsObj;
}
if ( !gf_legacy[ formId ] || gf_legacy[ formId ] !== '1' ) {
return optionsObj;
}
var $ = window.jQuery;
var isPreview = $( '#preview_form_container' ).length > 0;
var isRTL = window.getComputedStyle( $element[ 0 ], null ).getPropertyValue( 'direction' ) === 'rtl';
var overrides = {
showOtherMonths: false,
beforeShow: function( input, inst ) {
inst.dpDiv[0].classList.remove( 'gform-theme-datepicker' );
inst.dpDiv[0].classList.remove( 'gravity-theme' );
inst.dpDiv[0].classList.remove( 'gform-theme' );
inst.dpDiv[0].classList.remove( 'gform-legacy-datepicker' );
inst.dpDiv[0].classList.remove( 'gform-theme--framework' );
inst.dpDiv[0].classList.remove( 'gform-theme--foundation' );
inst.dpDiv[0].classList.remove( 'gform-theme--orbital' );
inst.dpDiv[0].classList.add( 'gform-legacy-datepicker' );
if ( isRTL && isPreview ) {
var $inputContainer = $( input ).closest( '.gfield' );
var rightOffset = $( document ).outerWidth() - ( $inputContainer.offset().left + $inputContainer.outerWidth() );
inst.dpDiv[ 0 ].style.right = rightOffset + 'px';
}
if ( isPreview ) {
inst.dpDiv[0].classList.add( 'gform-preview-datepicker' );
}
return ! this.suppressDatePicker;
}
};
return Object.assign( optionsObj, overrides );
}, -10 );