Hide/prefill the date on the booking page

Hello guys,

Is there anyway I can hide/pre-fill the DATES FIELD on the rentalhive theme booking page. With the way we are setting up our platform, the host will set a date where the property is available. Just one date. So in our case, it is not necessary to select a date range. My question would be

Is there any way we can hide the date field or prefill the date field with the date of the availabiilty I put in when creating a listing? My developer said he couldn’t find any information regarding that. Any help would be greatly appreciated. Thanks

Hi,

There’s no simple solution, but as a workaround, vendors can simply block all the month in their Caledars and unblock only that day - they want. So basically, users will open this “dates” form but will be able to choose only one date (that one that vendor unblocked).
It’s just a few clicks in the Calendar section.

Thanks, Serhii. That may not work for our idea. Can we hide it/pre-fill it?

Sorry for the delay. Unfortunately there’s no such option yet, it would require custom coding. Please let me know if you’re familiar with coding or have a developer for custom work, I can provide some guidance for the implementation.

Thanks ihor. We do have a developer for custom coding. He is struggling to find the code for this and set it up. Can you please provide us some guidance for the implementation? Your help would be greatly appreciated. Thanks

Hello @ihor , any update on this please?

Sorry for the late reply. Yes, it’s possible by using the hivepress/v1/forms/booking_make filter hook. This way you can override the _dates field of this form, setting default values (for example if you add a custom Date attribute to allow vendors to set a single date, you can fetch it and pre-fill) and hiding it (via CSS or by setting the display_type to hidden). Please note that extra back-end validation may be required in case if someone finds a hidden field via the web developer tools and sets another date in HTML.

Hope this helps.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.