Support » Plugin: The Events Calendar » How to disable datepicker "jump menu" behavior?

  • Resolved BenHToronto

    (@benhtoronto)


    Hi! The current implementation of the datepicker is not accessible, because it’s a a jump menu (submits automatically on change of month or year). I’m fighting with the code to disable this behavior so I can simply add in a submit button.

    Any ideas on this? Thank you so much for your time!

    This comment in the-events-calendar/public/template-tags/calendar.php tips me off, but doesn’t quite answer my question.

    /**
    * Month / Year Dropdown Selector (Display)
    *
    * Display the year & month dropdowns. JavaScript in the resources/events-admin.js file will autosubmit on the change event.
    *
    * @param string $prefix A prefix to add to the ID of the calendar elements. This allows you to reuse the calendar on the same page.
    * @since 2.0
    */
    function tribe_month_year_dropdowns( $prefix = ” ) {
    global $wp_query;

    if ( isset ( $wp_query->query_vars[‘eventDate’] ) ) {
    $date = $wp_query->query_vars[‘eventDate’];
    } else {
    $date = date_i18n( TribeDateUtils::DBDATEFORMAT );
    }
    $monthOptions = TribeEventsViewHelpers::getMonthOptions( $date );
    $yearOptions = TribeEventsViewHelpers::getYearOptions( $date );
    include(TribeEvents::instance()->pluginPath.’admin-views/datepicker.php’);
    }

    https://wordpress.org/plugins/the-events-calendar/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to disable datepicker "jump menu" behavior?’ is closed to new replies.