I have set up the calendar but it is not clear to me how to set the checkout calendar popup to show the selected check in date + 3 days.
Forums
checkin - checkout calendar
You need to use the Date/Time Limits behavior:
use the checkout date field name in the End Date field name setting, and do the opposite in the checkout field, use the checkin field name in the "Start date field name"
Unfortunately it doesn't work.
https://riccardo.design/it/
user = pallo
pswd = 1234567890
what is not working ? this is how it works:
The checkin date will reset the checkout field when it changes
The checkout date will not allow a date BEFORE the current selected checkin date
For me with all three browsers (cache cleared) as well as for my client with iOS, the pop-up calendars always start with today's date. The check-out calendar obviously needs to start at least with the check-in date or even 3 days (the expected stay) after that.
This means that the checkout starts on the date selected as check-in (or better the check-in + 3 days).
when you select today's date or any date at the checkin calendar, does the checkout calendar disables all dates before that date or not ?
As you can see, I have provided the address of my server in the above post, the calendar remains on today's date even if the check-in date is selected on 12/28. Obviously the value entered at check-in is not used.
ok, I checked the page, it's not working, but the page has javascript errors caused by another script which plays some video I think, so please test the form in the admin area, does it work as you want ?
The form works and is sent correctly. All other features work.
You can also test your module on another page that does not have this video component.
https://riccardo.design/it/verifica-disponibilita?view=form
The behavior is the same.
Are there any specific frameworks or libraries required for your component?
These are the libraries used by Gantry5 for that template.
strangely it does not work, but does it work in the admin area ?
And could you please test the attached demo form, does it work ?
Since your module works, I checked all the values in the different fields and discovered the problem. The value was missing in the "Saved format" field. I probably deleted it while working on it. Maybe it should be set as the default if it is not rated differently by the webmaster. Anyway, now my module works too! Thanks Max for your patience! This point has been resolved as well.
>> However, I noticed that the popup calendar gets stuck in December and doesn't show the checkout date 2025. I think this is a minor bug.
Even if I choose to change the date format and adopt the European one DD-MM-YYYY HH:mm:ss, the functionality no longer works.
You mean you can not select a checkout date in 2025 in all cases or only if you change the "Stored data" format ?
it's better to store the date in the default format as this is the default mysql date format and it's easy to convert date values later when they are in this format
[You mean you can not select a checkout date in 2025...]
Exactly. As you can also verify on your test module that I installed.
https://riccardo.design/it/check-in-check-out-20241207-060241?view=form
user = pallo
pswd = 1234567890
[... it's better to store the date in the default format...]
Understandable. But is there a setting in CF8 for our European standard to get the date of the modules in the European format?
What browser do you use ? I have just tested it here and it works fine:
I confirm that the checkout will not work if you change the stored format, you can keep the default stored format but change the value format when the form is submit this way:
inside the PHP action you need this code:
$this->data["checkout"] = date("d-m-Y H:i:s", strtotime($this->data["checkout"]));
[What browser do you use ? ...]
This issue occurs on the following browsers:
- Google Chrome Version 131.0.6778.109 (official build) (64 bit)
- Firefox 133.0 (64-bit)
- Microsoft Edge Version 131.0.2903.70 (official build) (64 bit)
- Google Chrome for Android v. 131.0.6778.104
[inside the PHP action you need this code:]
Unfortunately, I cannot solve this problem because I should buy the license.
I get the following error message:
"actions/php can be used on the frontend after validating your install"
The license purchase will only happen once the website is published and put into production and after my client has also decided which SEO policy (considering the TLD restrictions) to follow.
please try to clear the browser's cache, I could choose the checkin in December 2024 but the checkout in January 2025, you can not do the same ?
You can test the PHP in the admin area, or use the 10 days trial to test it in the front
I confirm that all my tests are always performed with a completely clean cache and always restarting the browser.
[...checkin in December 2024 but the checkout in January 2025, you can not do the same ?]
No. No matter what check-in date I enter, when I click the check-out pop-up calendar below, the pop-up calendar window remains stuck in the current month (December).
[... test the PHP in the admin area...]
Thank you for your advice, but according to your answer, it is clear that in CF8 a possible European date format (which unfortunately cannot be determined by my customer, who has no IT programmer knowledge) is only possible with the purchase of the license. I am preparing the new website for my customer so that from 2025 he and his daughter can carry out the updates themselves.
I updated the live installed to make it possible to use your custom date format as the "Stored format" and make this work with the start date option, so please download the latest Chronforms8 extension installer again and install it over yours then test the form I sent with your custom format and without the PHP
Let me know!