Selecting prev/next month acting weird is specific instances

Issue #1009 wontfix
Valentina R created an issue

When on February Month and clicking the 1st of March on the same calendar, the 1.3. is selected. Now, when clicking the next month arrow, the month of “May” shows in the calendar.

The same thing happens if you click the prev month when the 31.1. is selected. It will show the December calendar.


Not sure what the correct behaviour should be because technically, the correct month is selected, but probably it’s not what customers expect when they click the prev/next month in such cases.

Reported here.

Comments (1)

  1. Željan Topić

    Trivial bug indeed. Works as intended by the jQuery developers. Can be avoided by removing days from other months in the calendar using the following code snippet:

    // Do not show days from other months in current month.
    add_filter( 'wc_appointment_form_params', 'bwp_calendar_filter_picker_options' );
    function bwp_calendar_filter_picker_options( $appointment_form_params ) {
        $appointment_form_params['showOtherMonths'] = false;
    
        return $appointment_form_params;
    }
    
  2. Log in to comment