It works differently if you let your users select the duration of their booking.
First of all, you have to define your booking unit.
The booking unit allows the system to calculate the duration of the booking dynamically, based on the quantity set by users in the “Duration” field. It will be calculated as the product of two factors, the value entered by the user (3 in the screenshot below) multiplied by the booking unit set by the admin (3 in the screenshot above)
Suppose you have set the booking unit to “3 days” (as shown in the image above), and that the user has typed “3” as the value for his booking duration, the “total duration” of the booking will be 9 days.
The end date will be automatically calculated as soon as the user selects the start date.