How to show past bookings in usual calendar?

Deprecated for Update 9.8 or newer

First of all, Booking Calendar can not show past months, because it’s does not possible to create bookings in past.
You can show past bookings in Timeline view, like in this demo.

But if by some reason, you need to show bookings in usual inline month view calendar, so then you will be need to make this fix.

Please make backup of your Booking Calendar folder at the ../wp-content/plugins/ for ability to restore it, if you will make some mistake, or just need original Booking Calendar version.

Important! Please note, its hack/trick customization. Its will not be supported in future updates. So you will need to make this customization each time after upfdate of plugin. If something is not work, please recheck this instruction once again. Its was test in Booking Calendar update 8.3.2 and working well.

Disclaimer. Unfortunately we can not start, right now, some personal customization or custom development, because almost have no free time.
Check more about new features here https://wpbookingcalendar.com/faq/need-new-feature/
Thank you for understanding.
Please note, if you will modify the source code of the Booking Calendar, we will not guaranteed the correct work of plugin and do not support it.

So let start.

1) Please open this file ../wp-content/plugins/{Booking Calendar Folder}/core/lib/wpdev-booking-class.php

( you can check how to edit files in WordPress menu in this article https://wpbookingcalendar.com/faq/how-edit-file-in-wp-menu/ )

then find this code:

        if ($approved == 'admin_blank') {</p>
<p>            $sql_req = "SELECT DISTINCT dt.booking_date</p>
<p>                     FROM {$wpdb->prefix}bookingdates as dt</p>
<p>                     INNER JOIN {$wpdb->prefix}booking as bk</p>
<p>                     ON    bk.booking_id = dt.booking_id</p>
<p>                     WHERE  dt.booking_date >= CURDATE() {$trash_bookings} AND bk.booking_type IN ($bk_type_additional) AND bk.form like '%admin@blank.com%'</p>
<p>                     ORDER BY dt.booking_date" ;
            $dates_approve = $wpdb->get_results(  $sql_req  );</p>
<p>        } else {</p>
<p>            if ($approved == 'all')
                $sql_req = apply_bk_filter('get_bk_dates_sql', "SELECT DISTINCT dt.booking_date</p>
<p>                     FROM {$wpdb->prefix}bookingdates as dt</p>
<p>                     INNER JOIN {$wpdb->prefix}booking as bk</p>
<p>                     ON    bk.booking_id = dt.booking_id</p>
<p>                     WHERE  dt.booking_date >= CURDATE() {$trash_bookings} AND bk.booking_type IN ($bk_type_additional)</p>
<p>                     ". (($skip_booking_id != '') ? " AND dt.booking_id NOT IN ( ".$skip_booking_id." ) ":"") ."</p>
<p>                     ORDER BY dt.booking_date", $bk_type_additional, 'all' , $skip_booking_id);</p>
<p>            else
                $sql_req = apply_bk_filter('get_bk_dates_sql', "SELECT DISTINCT dt.booking_date</p>
<p>                     FROM {$wpdb->prefix}bookingdates as dt</p>
<p>                     INNER JOIN {$wpdb->prefix}booking as bk</p>
<p>                     ON    bk.booking_id = dt.booking_id</p>
<p>                     WHERE  dt.approved = $approved AND dt.booking_date >= CURDATE() {$trash_bookings} AND bk.booking_type IN ($bk_type_additional)</p>
<p>                     ". (($skip_booking_id != '') ? " AND dt.booking_id NOT IN ( ".$skip_booking_id." ) ":"") ."</p>
<p>                     ORDER BY dt.booking_date", $bk_type_additional, $approved, $skip_booking_id );
//$sql_req = str_replace( 'dt.booking_date >= CURDATE()  AND', '' , $sql_req);	//Show past bookings,  as well
            $dates_approve = apply_bk_filter('get_bk_dates', $wpdb->get_results( $sql_req ), $approved, 0,$bk_type );
        }

and replace it to this code:

        if ($approved == 'admin_blank') {</p>
<p>            $sql_req = "SELECT DISTINCT dt.booking_date</p>
<p>                     FROM {$wpdb->prefix}bookingdates as dt</p>
<p>                     INNER JOIN {$wpdb->prefix}booking as bk</p>
<p>                     ON    bk.booking_id = dt.booking_id</p>
<p>                     WHERE  1=1 {$trash_bookings} AND bk.booking_type IN ($bk_type_additional) AND bk.form like '%admin@blank.com%'</p>
<p>                     ORDER BY dt.booking_date" ;
            $dates_approve = $wpdb->get_results(  $sql_req  );</p>
<p>        } else {</p>
<p>            if ($approved == 'all')
                $sql_req = apply_bk_filter('get_bk_dates_sql', "SELECT DISTINCT dt.booking_date</p>
<p>                     FROM {$wpdb->prefix}bookingdates as dt</p>
<p>                     INNER JOIN {$wpdb->prefix}booking as bk</p>
<p>                     ON    bk.booking_id = dt.booking_id</p>
<p>                     WHERE  1=1 {$trash_bookings} AND bk.booking_type IN ($bk_type_additional)</p>
<p>                     ". (($skip_booking_id != '') ? " AND dt.booking_id NOT IN ( ".$skip_booking_id." ) ":"") ."</p>
<p>                     ORDER BY dt.booking_date", $bk_type_additional, 'all' , $skip_booking_id);</p>
<p>            else
                $sql_req = apply_bk_filter('get_bk_dates_sql', "SELECT DISTINCT dt.booking_date</p>
<p>                     FROM {$wpdb->prefix}bookingdates as dt</p>
<p>                     INNER JOIN {$wpdb->prefix}booking as bk</p>
<p>                     ON    bk.booking_id = dt.booking_id</p>
<p>                     WHERE  dt.approved = $approved AND 1=1 {$trash_bookings} AND bk.booking_type IN ($bk_type_additional)</p>
<p>                     ". (($skip_booking_id != '') ? " AND dt.booking_id NOT IN ( ".$skip_booking_id." ) ":"") ."</p>
<p>                     ORDER BY dt.booking_date", $bk_type_additional, $approved, $skip_booking_id );
//$sql_req = str_replace( 'dt.booking_date >= CURDATE()  AND', '' , $sql_req);	//Show past bookings,  as well
            $dates_approve = apply_bk_filter('get_bk_dates', $wpdb->get_results( $sql_req ), $approved, 0,$bk_type );
        }

2) Please open this file ../wp-content/plugins/{Booking Calendar Folder}/js/client.js

( you can check how to edit files in WordPress menu in this article https://wpbookingcalendar.com/faq/how-edit-file-in-wp-menu/ )

then find this code:

var bkMinDate = 0;

and replace it to this code:

var bkMinDate = null;

3)
then find this code:

if (is_this_admin == false) {

and replace it to this code:

if  ( (false) && (is_this_admin == false) ) {

4) Please open this file ../wp-content/plugins/{Booking Calendar Folder}/js/wpbc_times.js

( you can check how to edit files in WordPress menu in this article https://wpbookingcalendar.com/faq/how-edit-file-in-wp-menu/ )

then find this code:

function isTimeTodayGone( myTime, sort_date_array ){

and replace it to this code:

function isTimeTodayGone( myTime, sort_date_array ){
   return false;

5) If you are using paid version of Booking Calendar, then
Please open this file ../wp-content/plugins/{Booking Calendar Folder}/inc/_ps/personal.php

( you can check how to edit files in WordPress menu in this article https://wpbookingcalendar.com/faq/how-edit-file-in-wp-menu/ )

then find this code:

        if ($approved == 'all')
              $sql_req =   "SELECT DISTINCT dt.booking_date</p>
<p>                 FROM {$wpdb->prefix}bookingdates as dt</p>
<p>                 INNER JOIN {$wpdb->prefix}booking as bk</p>
<p>                 ON    bk.booking_id = dt.booking_id</p>
<p>                 WHERE  dt.booking_date >= CURDATE() {$trash_bookings} AND bk.booking_type  IN ($bk_type) ".$skip_bookings."</p>
<p>                 ORDER BY dt.booking_date";</p>
<p>        else
             $sql_req = "SELECT DISTINCT dt.booking_date</p>
<p>                 FROM {$wpdb->prefix}bookingdates as dt</p>
<p>                 INNER JOIN {$wpdb->prefix}booking as bk</p>
<p>                 ON    bk.booking_id = dt.booking_id</p>
<p>                 WHERE  dt.approved = $approved AND dt.booking_date >= CURDATE() {$trash_bookings} AND bk.booking_type IN ($bk_type) ".$skip_bookings."</p>
<p>                 ORDER BY dt.booking_date" ;

and replace it to this code:

        if ($approved == 'all')
              $sql_req =   "SELECT DISTINCT dt.booking_date</p>
<p>                 FROM {$wpdb->prefix}bookingdates as dt</p>
<p>                 INNER JOIN {$wpdb->prefix}booking as bk</p>
<p>                 ON    bk.booking_id = dt.booking_id</p>
<p>                 WHERE  1=1 {$trash_bookings} AND bk.booking_type  IN ($bk_type) ".$skip_bookings."</p>
<p>                 ORDER BY dt.booking_date";</p>
<p>        else
             $sql_req = "SELECT DISTINCT dt.booking_date</p>
<p>                 FROM {$wpdb->prefix}bookingdates as dt</p>
<p>                 INNER JOIN {$wpdb->prefix}booking as bk</p>
<p>                 ON    bk.booking_id = dt.booking_id</p>
<p>                 WHERE  dt.approved = $approved AND 1=1 {$trash_bookings} AND bk.booking_type IN ($bk_type) ".$skip_bookings."</p>
<p>                 ORDER BY dt.booking_date" ;

6) If you are using Booking Calendar Business Large or higher version then, Please open this file ../wp-content/plugins/{Booking Calendar Folder}/inc/_bl/biz_l.php

( you can check how to edit files in WordPress menu in this article https://wpbookingcalendar.com/faq/how-edit-file-in-wp-menu/ )

then find this code:

WHERE ".$my_approve_rule." dt.booking_date >= CURDATE() {$trash_bookings} AND

and replace it to this code:

WHERE ".$my_approve_rule." 1=1 {$trash_bookings} AND

Test it.
Please do not forget to clear browser cache before testing these changes.