• The offset calculation for the date field limit seems to be subtracting 1 day from the desired value. In this case we have a “check in date” and “check out date”. The check out starting date relative to the check-in date should be 2 days after or later, for a 2 night minimum booking rule. But with this setting it allows the user to select a date starting 1 day after the check-in date. If I set it to 3 days offset, it starts 2 days after (as I have it set now after my client noticed the discrepancy).

    • This topic was modified 4 months, 1 week ago by tnightingale.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support Zafer – WPMU DEV Support

    (@wpmudevsupport15)

    Hi @tnightingale,

    I hope you are doing well today!

    Please share an export of the form with us, so that we can check further and provide some workaround if possible.

    You can find more info on how to export the form here : https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#import-export

    After exporting, please the file contents with us using the free services such as https://pastebin.com or https://justpaste.it

    Please always make sure to use such services to share the code and don’t post the code here directly as it will most likely be unusable.

    Kind regards,
    Zafer

    Thread Starter tnightingale

    (@tnightingale)

    Thank you. Here’s the export: https://pastebin.com/QecrF8bF

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @tnightingale,

    Forminator is inherently coded to function as a general form solution and the Offset feature is not designed to operate based on booking parameters, and hence you notice such a behaviour.

    Setting an offset of 3 would be the appropriate course of action to follow in your use case.

    Is the issue only with the offset count? or are there more issues you notice in the mentioned form export?

    Please advise so that we could check further.

    Kind Regards,

    Nithin

    Thread Starter tnightingale

    (@tnightingale)

    What does the form’s purpose have to do with this? Why should the date field name make any difference to the offset calculation?

    Wouldn’t it be better to fix the error instead of telling us to add 1 to the offset setting? When it gets fixed we’d all need to adjust the offsets to the correct values.

    I didn’t notice any other problems with the form behaviour. I use Forminator on lots of sites and haven’t found any calculation errors like this before.

    Thank you.

    Plugin Support Dmytro – WPMU DEV Support

    (@wpmudevsupport16)

    Hello @tnightingale,

    The date calculation using offset simply adds or subtracts the given value.

    For example, if {date-1} is set to February 3, and the offset of {date-2} field is +2, the result should be calculated like this: 3+2=5. So February 5 is going to be the first available date for {date-2}.

    If for your application you’d like February 5 to remain disabled, you’ll just have to increase the offset value by 1.

    We understand that in cases like yours, you’d expect it to calculate check out starting date in a different way, without increasing the value manually, and we have shared your suggestions with the developers.

    They’ll be considering further interface/calculation improvements, however we can’t provide ETA, or guarantee it’s going to be changed anytime soon, I’m afraid.

    Thank you for your feedback, and please take our apologies for misunderstanding!

    Best Regards,
    Dmytro

    Thread Starter tnightingale

    (@tnightingale)

    For example, if {date-1} is set to February 3, and the offset of {date-2} field is +2, the result should be calculated like this: 3+2=5. So February 5 is going to be the first available date for {date-2}.

    But that is not what is happening. With an offset of +2, Feb 4 is the first available date for {date-2} when {date-1} is Feb 3. To make Feb 5 the first available date, I have to set the offset to +3, not +2. So the math is incorrect in the plugin. I can’t make it any clearer.

    Thank you for investigating this issue.

    Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi @tnightingale

    I have made a full review of this topic and it seems we are not on the same page from the beginning. I have made a fresh form and also imported your form (also changed couple of times the offset) and I was not able to replicate this issue.

    If the 5th day of the month is Check In date and the offset is 2 days, the next available date in Check Out date is the 7th day of the month. In your case, this is the 6th day of the month if I understand this correctly. As mentioned above, with your form shared and modified with offset a couple of times I’m not able to replicate this.

    In such case there must be something on the site which affect this incorrect offset issue.

    Would you please run a conflict test? Please deactivate all plugins except Forminator one and check if the problem is gone. If so, then enable all plugins one by one and find which one is having a conflict. If there is no positive result, switch to the default WordPress theme like 2019, and see if it works.

    Before this test, we recommend full site backup or running this test on the staging site.

    If that test will not give any positive results, please email us at: wpsupport@incsub.com
    Subject: ATTN: WPMU DEV support – wp.org

    Please send:
    – Link back to this thread for reference (https://wordpress.org/support/topic/date-limit-calculation-off-by-1-day/)
    so that we could review this case more for you

    Kind Regards,
    Kris

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @tnightingale,

    Since we haven’t heard from you for a while. I’ll mark this thread as resolved for now. Please feel free to open a new thread if you have new queries.

    Kind Regards
    Nithin

    Thread Starter tnightingale

    (@tnightingale)

    Hello, sorry for the time delay, I have been very busy with other projects. This is not resolved unfortunately.

    I have made a staging site where I disabled all other plugins and switched to 2024 theme, and the problem persists. An offset of 2 days still makes it possible to select the next day. On the live site, where I have it set to an offset of 3 days, a few site visitors have complained they are only able to select from the 3rd day from the start date (e.g. July 1st start date, July 4th end date) – so it is working as expected for certain device/browser configurations (a minority). Maybe that gives a clue as to what’s causing this.

    I hope this can be figured out as Forminator is by far the best form plugin in every other way.

    Plugin Support Dmytro – WPMU DEV Support

    (@wpmudevsupport16)

    Hello @tnightingale,

    Thank you for the explanation!

    Sorry to hear the issue persists. Our team has received your email – could you please check your inbox, and reply to our email we’ve sent in response.

    Best Regards,
    Dmytro

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.