• Resolved npkantelberg

    (@npkantelberg)


    It appears on the calendar pages created by the The Events Calendar plugin there is an issue causing the date picker for the month to not populate correctly. We believe this is a bug related to the core files that are a part of WordPress 4.9. It seems there is already a datepicker.min.js file that is being loaded in the core files as well as by The Events Calendar plugin and these are in conflict with each other. When the core datepicker file is paused the popup works as expected.

    Here is a link to a video that shows this issue in action. https://share.getcloudapp.com/7Kupdek5

    Here is an example site this can be viewed on. https://theexperienceautogroup.dev.dealerinspire.com/events/month/

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Marho

    (@matumu)

    Hello @npkantelberg

    Can you please check and confirm that you have the latest version of our plugins running on your site?

    Also, could you please go through the steps in this troubleshooting guide to see if this issue is the result of a theme or plugin conflict: https://theeventscalendar.com/knowledgebase/k/testing-for-conflicts/

    Best regards,

    Marho

    Thread Starter npkantelberg

    (@npkantelberg)

    Hey @matumu thank you for your reply here. We did some more digging and it appears this is an issue when calling the datepicker.min.js file from jQuery UI https://api.jqueryui.com/datepicker/. In this instance we were calling this file for a different plugin.

    We were able to solve this by dequeuing this file specifically on the pages that load the events calendar calendar. This should be solved now, thanks!

    Here is the code we used to dequeue the script for documentation.

    add_action('wp_head',function(){
      function dequeue_datepicker_script() {
        var_dump(get_body_class());
        $event_post_classes = [
          'tribe-events-page-template'
        ];
        $classes = get_body_class();
        // echo('Classes: ' . $classes[1]);
        $exists = false;
        foreach ($event_post_classes as $event_class) {
          // echo($event_class);
          if (in_array($event_class, $classes)) {
            echo('did it run?');
            $exists = true;
            break;
          }
        }
        return $exists;
      };
      if (dequeue_datepicker_script()) {
        wp_dequeue_script('gforms_datepicker');
      }
    });

    Can someone help solving this issue? Im having the same problem. Where should I use this code?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘The calendar date picker dropdown is not working as expected.’ is closed to new replies.