Only one date selection in search


Is it possible that user could only select one date, and it wouldn’t require / recommend to select multiple dates for the search for bookable available listings? As now user can select multiple dates to search listings. We would need these two options:

  1. Select only one date in search form
  2. Do not allow to select dates in listing booking, as our priority is now to only let user to see what dates are available for that specific listing, but we won’t let him to book these dates for now.

Is it possible to do these two functionalities?

If there’s a single date per listing you can try using a custom Date attribute instead of bookings, to indicate this date on the listing page and allow searching listings by a specific date. Switching the date range search to date only and disabling bookings while displaying the availability is possible, but requires code customizations.

Could you explain please what do you mean with single date per listing? And are there any snippets for disabling bookings / and to allow only one day selection in search?

If you don’t need the booking features please try to disable the HivePress Bookings extension in WordPress/Plugins. Then you can add a custom Date attribute in Listings/Attributes, mark it as Editable and Required, set the Date Range search type for it, mark it as Filterable etc. This way there will be a single unique date for listings that can be set in the listing edit form and it’ll be possible to search listings based on this date.

But will there also be possibility to mark available / not available dates for vendor? Similar to functionality that there is in bookings, where user can select dates in his calendar and disable them.

In this case please consider using Bookings because attribute allows saving a single date per attribute only. With Bookings vendors can block specific date ranges in the calendar, also set the booking offset and window to control how far users can book in advance and the minimum delay until the first date available for booking.

Yes, so as I understood we still need to use bookings, but is there any simple snippet which could disable possibility to select multiple dates in search?

Yes, it may be possible with a snippet but please describe the use-case for this - with a single date selection users would have to change the date and click Search for every date, with a date range they can search (for example) all listings available for a specific week or month.