WP Rentals Help WP Rentals Help

  • Client Support
  • Video Tutorials
  • WpRentals
  • WpEstate
  • API
Home / Technical how to / Technical: How to limit calendar in booking form

Technical: How to limit calendar in booking form

7282 views

 

To limit the number of months on the booking form from the property page you must do the following
In js/property.js file

Look for the function check_in_out_enable2 (should be around line 150) and add this piece of code  – replace 3 with your number of Months

var futureMonth = moment(today).add(3, 'M');

The above code will be one that limits the number of months.

After that  add

maxDate:futureMonth,

in the options object – should end up with something like

var options = {
opens:calendar_opens,
singleDatePicker: false,
autoApply: true,
alwaysShowCalendars: true,
autoUpdateInput: false,
minDate:today,
maxDate:futureMonth,
locale:{
daysOfWeek:dayNamesShort,
monthNames:longmonths
},
isCustomDate:wpestate_booking_show_booked,
};

 

To limit the calendar in the search form:

The change needs to be done in \wprentals\js\control.js

 

 

Technical how to

Related Articles

  • How to change the background color and logo for admin login page
  • How to redirect Instant Booking Button to WooComemrce Checkout Page
  • Tehnical: Redirect to Page Not found/ White screen on listing submission or edit
  • Technical – Invoices from My Bookings

HELP CATEGORIES

  • 61. General
  • 102. Installation & Basic Setup
  • 93. Installation FAQ
  • 404. How Booking Works
  • 145. User dashboard pages
  • 20Advanced Search Options
  • 3Blog Post
  • 9Custom Page Templates
  • 18Elementor Compatibility
  • 13Email Notifications
  • 19FAQ
  • 10Menu Options
  • 26Multi-Languages - 3rd party
  • 9Owner
  • 25Property / Listing
  • 21Shortcodes
  • 11Submit Form
  • 4Supported Maps
  • 93Technical how to
  • 5Third Party plugins
  • 3Translation
  • 13Widgets
  • 2WooCommerce Payments
  • 13WP Rentals Payment
  • 77WP Rentals Theme Options

Join Us On

Powered by WP Estate - All Rights Reserved
  • Client Support
  • Video Tutorials
  • WpRentals
  • WpEstate
  • API