WordPress.org

Ready to get started?Download WordPress

Forums

Expired plugin Events Manager Extended, use Events Made Easy
[resolved] [Plugin: Events Manager Extended] Datepicker (6 posts)

  1. ricardobeat
    Member
    Posted 3 years ago #

    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.

  2. Franky
    Member
    Plugin Author

    Posted 3 years ago #

    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

  3. ricardobeat
    Member
    Posted 3 years ago #

    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.

  4. Franky
    Member
    Plugin Author

    Posted 3 years ago #

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

  5. Franky
    Member
    Plugin Author

    Posted 3 years ago #

    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.

  6. ricardobeat
    Member
    Posted 3 years ago #

    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");

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic