• Resolved Kasper Rubin

    (@kasper-rubin)


    I have a scripting issue with the way Elementor Header Footer Builder works. As it replaces the header and footer files, an important script is removed and Contact Form 7 Datepicker stops functioning on my front page form.

    If I try to place that script in my child theme header or footer, Elementor Header Footer Builder, along with Revolution Slider and a couple other plugins stops functioning correctly or not at all.

    Also tried removing both javascript references (datepicker doesn’t work) or just one (the other plugins doesn’t work).

    How can I resolve the issue?

    This is my problematic script:

    <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.2.min.js"></script>
    
    <script type="text/javascript" src="https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
    
    <script language="javascript">
            $(document).ready(function () {
                $("#arrival").datepicker({
    			 dateFormat: 'dd/mm-yy',
                    minDate: 0,
                });	
    			$("#departure").datepicker({
    			dateFormat: 'dd/mm-yy',
                    minDate: 0,
                });
            });
        </script>
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Team Brainstorm Force

    (@brainstormteam)

    Hello @kasper-rubin

    I can see there are some script files at the beginning which might be causing other files to malfunction.

    Here is modified custom code for your requirement.

    function add_script(){
        ?>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
        <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.2.min.js"></script>
        <script type="text/javascript" src="https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
    
        <script language="javascript">
            jQuery(document).ready(function () {
            jQuery("#arrival").datepicker({
            dateFormat: 'dd/mm-yy',
            minDate: 0,
            });
            jQuery("#departure").datepicker({
            dateFormat: 'dd/mm-yy',
            minDate: 0,
            });
        });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_script');
    function custom_script_jquery(){wp_enqueue_script('jquery');}
    add_action('wp_head', 'custom_script_jquery');

    Please put this code in the Child Theme’s functions.php

    Let me know how it goes.

    If the issue still persists, don’t hesitate to open a ticket with us for quicker resolution.

    Regards,
    Suman

    Thread Starter Kasper Rubin

    (@kasper-rubin)

    Hey, it didn’t make any changes. I found also that the mobile menu is not working because of this. Any suggestions?

    I can’t open a ticket with you.

    Plugin Support Team Brainstorm Force

    (@brainstormteam)

    Hello @kasper-rubin

    We will need to take a closer look to help you with this issue.

    Please use the following link.

    Looking forward to hearing from you!

    Regards,
    Suman

    Thread Starter Kasper Rubin

    (@kasper-rubin)

    Okay, I have sent you a message on the website.

    Plugin Support Team Brainstorm Force

    (@brainstormteam)

    Hello @kasper-rubin

    I can see the issue being resolved by our team, it was related to the error caused by another plugin. ??

    So I marking this query as resolved.

    Do let us know if there is anything else we can help you with.

    Regards,
    Suman

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Functionality ruined by Contact form 7 datepicker script’ is closed to new replies.