WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Events Manager Extended] Datepicker

[Resolved] [Plugin: Events Manager Extended] Datepicker

  • Hi,

    When adding/editing an event, the date input fields are set to readonly. Even after deleting the attribute via inspector the datepicker doesn’t work.

    There is also a script error, it looks for ui.datepicker-pt.js but there is only a ui.datepicker-pt-BR.js file (my wplang is pt_BR). Datepicker still doesn’t work after renaming the file.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Franky

    @liedekef

    The date input fields need to be readonly so people can only use the datepicker and not fill in things manually. Jquery then takes care of the rest.
    I’ll take a look at the language issue, but can you test if it works in English? Btw: please post issues to http://www.e-dynamics.be/bbpress

    Doesn’t work in en either.

    I just noticed it loads both ui.datepicker.js and ui.datepicker-pt.js

    Edit: looks like it’s a conflict with another plug-in, can’t figure out which yet.

    Edit 2: It’s Simple Fields… my guess is it’s initializing the datepicker again somewhere, but I can’t find the script. #ui-datepicker-div is actually updating it’s position etc. but it can’t get rid of display:none – probably result of calling toggle() twice.

    Plugin Author Franky

    @liedekef

    Ok, good to know. I’ll what I can do about this conflict.

    Plugin Author Franky

    @liedekef

    Ok, it seems there’s an issue with simpole-fields: they use a mix of wordpress jquery and google jquery. Never going to work reliably.
    The solution is simple: replace the function wp_deregister_script in simple-fields.php by this code:

    wp_deregister_script('jquery');
            wp_deregister_script('jquery');
            wp_deregister_script("jquery-ui-core");
            wp_deregister_script("jquery-ui-sortable");
            wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js', false, '1.4.2');
            wp_register_script('jquery-ui-core','http://jquery-ui.googlecode.com/svn/tags/latest/ui/minified/jquery.ui.core.min.js',false,'1.8');
            wp_enqueue_script("jquery-ui-core");
            wp_register_script('jquery-ui-sortable','http://jquery-ui.googlecode.com/svn/tags/latest/ui/minified/jquery.ui.sortable.min.js',false,'1.8');
            wp_enqueue_script("jquery-ui-sortable");
            wp_enqueue_script("jquery-ui-effects-core", "http://jquery-ui.googlecode.com/svn/tags/latest/ui/minified/jquery.effects.core.min.js");
            wp_enqueue_script("jquery-ui-effects-highlight", "http://jquery-ui.googlecode.com/svn/tags/latest/ui/minified/jquery.effects.highlight.min.js");
            wp_enqueue_script("thickbox");
            wp_enqueue_style("thickbox");
    
            define( "EASY_FIELDS_FILE", menu_page_url("simple-fields-options", false) );
    
    }

    And then it all works … maybe something to give to the author of the simple-fields plugin.

    Thanks for taking the time. I figured it’s best to just swap the offending lines for version 1.7.3, no errors so far. Deregistering wp’s core jquery scripts is a bit dangerous, after disabling the plugin the whole admin area fell apart. I’ll get in touch with Simple Fields’ author to see what can be done.

    wp_enqueue_script("jquery-ui-effects-core", "http://jquery-ui.googlecode.com/svn/tags/1.7.3/ui/effects.core.js");
    wp_enqueue_script("jquery-ui-effects-highlight", "http://jquery-ui.googlecode.com/svn/tags/1.7.3/ui/effects.highlight.js");
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] [Plugin: Events Manager Extended] Datepicker’ is closed to new replies.