'auto-select' works weird when 1st of next month is first available date

Issue #502 resolved
Valentina R created an issue

Let's say we don't have any available slots this month and the first available slot is the first day of the next month. The calendar does not change to the next month but stays at the current month which could be confusing for the customers.

Reported here: https://bookingwp.com/forums/topic/start-calendar-at-next-month/

Comments (1)

  1. Željan Topić

    Won't be added to core as we'll introduce additional calendar options available to filter with 4.4.9. In this case, the filter below will remove days from other months:

    add_filter( 'wc_appointment_form_params', 'bwp_calendar_filter_picker_options', 10 );
    function bwp_calendar_filter_picker_options( $appointment_form_params ) {
        $appointment_form_params['showOtherMonths'] = false;
    
        return $appointment_form_params;
    }
    
  2. Log in to comment