Changing End Date default value.

Created on 27 July 2022, over 2 years ago
Updated 19 December 2023, over 1 year ago

I'm trying to make the booking available for 1 month I tried to modify the AddReservationForm.php. I'm unable to set End Data by +31 Days I tried to disable the $form['end_date'] and set +31 days
if ($end_date_open_hour['end'] < $end_date_open_hour['start']) {
$end_date_open_hour['end']->modify('+1 day'); here I changed to 31 days
}
What is happening if I book from 27/07/22(start date which is the current date) then 1 month will be booked up to 27/08/22 and the End date field is disabled but if I change the start date for 29/07/22 then the End Date is not changing the booking will be from 29/07/22 to 27/08/22(the end date is set to the current date) the actual should be 29/07/22 to 29/08/22.
Any idea what to do to book for 1 month but the end date should not be changed by the user.

🌱 Plan
Status

Postponed

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024