Forums

checkin - checkout calendar

support210 04 Dec, 2024

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.

CF8-calendar.jpg
Riccardo Rausch
https://rausch.it
Max_admin 04 Dec, 2024
Answer

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"

Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
support210 05 Dec, 2024

Unfortunately it doesn't work.

https://riccardo.design/it/

user = pallo

pswd = 1234567890

checkin-checkout.jpg
Riccardo Rausch
https://rausch.it
Max_admin 05 Dec, 2024

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

Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
support210 06 Dec, 2024

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).

Riccardo Rausch
https://rausch.it
Max_admin 06 Dec, 2024

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 ?

Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
support210 06 Dec, 2024

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.

checkin-checkout-2.jpg
Riccardo Rausch
https://rausch.it
Max_admin 06 Dec, 2024

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 ?

Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
support210 06 Dec, 2024

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?

Riccardo Rausch
https://rausch.it
support210 06 Dec, 2024

These are the libraries used by Gantry5 for that template.

frameworks-atoms-gantry5.jpg
Riccardo Rausch
https://rausch.it
Max_admin 06 Dec, 2024

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 ?

Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
support210 07 Dec, 2024

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.

checkin-checkout-solved.jpg
Riccardo Rausch
https://rausch.it
Max_admin 07 Dec, 2024

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

Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
support210 07 Dec, 2024

[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?

Riccardo Rausch
https://rausch.it
Max_admin 07 Dec, 2024

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"]));
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
support210 08 Dec, 2024

[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.

Riccardo Rausch
https://rausch.it
Max_admin 08 Dec, 2024

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

Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
support210 09 Dec, 2024

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.

Riccardo Rausch
https://rausch.it
Max_admin 09 Dec, 2024

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!

Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
You need to login to be able to post a reply.