Skip to main content
All CollectionsWeb CheckoutManuals
How to Preselect the First Available Date
How to Preselect the First Available Date

Automatically select the earliest available date, guiding customers and simplifying bookings.

Lucia Burin Sestakova avatar
Written by Lucia Burin Sestakova
Updated today

Preselect First Available Date is a feature that automatically selects the earliest available date for customers:

  • in the current month for products available year-round, or

  • in the product's starting month for limited availability.

This provides helpful guidance, especially when tours are scheduled far in advance, and reduces the need for customers to manually search for the next available date. The calendar modal remains open for the customer to browse dates at their convenience.

When the feature is disabled, the calendar modal will still be displayed, but no date will be preselected, giving customers the option to select a date entirely on their own.


Update Data-Config

Add the below piece of code in the data-config attribute of your checkout script, see the Implementation Guide for more information.
​

"features": { 
"preselectFirstAvailableDateModalCalendar": true
}


Simply adding the feature in the data-config enables the feature on all products in the checkout. If you wish to limit this feature to specific products, you can do so by specifying the product ID in the data-config attribute.
​
You can add the preselectFirstAvailableDateModalCalendar feature to your data-config for script or button.
​

<script src="https://cdn.checkout.ventrata.com/v3/production/ventrata-checkout.min.js" type="module" data-config='{"apiKey":"<YOUR_API_TOKEN>", "features": { "preselectFirstAvailableDateModalCalendar": true } }'></script>


Product Setup

Specify the start and end dates, as appropriate, for products that are available only during specific periods. This setting will ensure the calendar automatically displays the calendar month when the product becomes available, skipping any months where it is unavailable.

  1. In the Ventrata dashboard, go to Products > Products.

  2. Select the required product.

  3. Press the pen and paper icon to edit the product detail.

  4. Enter the start and end dates as appropriate.

    Starts On &amp; Ends On

  5. Press the Update Product button to save your settings.

If any of the product options have different start and end dates, make sure to reflect that in the option settings.

  1. On the Option tab of product level, press the pen and paper icon next to the appropriate option to edit it.

  2. Enter the start and end dates as appropriate.

    Starts On &amp; Ends On

  3. Press the Update Option button to save your settings.


First Available Date Flow

Product is Available during the Current Month

Current month: January

Product/option availability: open all year

It is January and the customer selects a product. They select their preferred option and number of tickets. The calendar searches for the nearest available date in January and preselects it for the customer. The customer then proceeds to complete the booking.

Product is Available Months Ahead

Current month: January

Product/option availability: from April 1 (this must be set up in the 'Starts On' field of the product or option)

It is January and the customer selects a product that is not available until April. They select their preferred option and number of tickets. Because the product's (or option's) availability is not open until April, the calendar view jumps to April and the first available date in that month if there is one. The customer then proceeds to complete the booking.

Did this answer your question?