Allow selecting a single date only

Hello!
First at all, thanks for your support.
I have many questions at this time about Rentalhive.
e.g.:

  • if we work with a only ONE DAY bookings,
    we don’t need the Start date and end date after somebody click on “Request to book”, how can i change it for only a one date field?
  • the double click selection in calendar to request a book is still necessary some times, other times it works fine, but i dont know what does it depend on…
    Thanks a lot!

Please try this PHP snippet to hide the end date field

add_filter(
	'hivepress/v1/forms/booking_confirm',
	function( $form ) {
		if(!isset($form['fields']['end_time'])){
			return $form;
		}
		
		$form['fields']['end_time']['type'] = 'hidden';

		return $form;
	},
	1000
);

If you mean double-click to select one date then please try to set 1 as the Maximum Booking Duration option for a listing

Thanks!
All is working now!

1 Like

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