• Hi. I have two date pickers on a form, as a calendar type – a start date and an end date. For the end date, I have a limit set for +14 days from the start date. If I pick an end date that is at least 14 days after the start date, this validates as expected when attempting to submit the form, but the end date calendar actually lets me pick the day before (+13 days), which does fail the validation upon submit, but the first 12 days are blocked from the calendar, so it seems like an oversight that the 13th day is not also blocked.

    For example, in my screenshots, my start date is Dec 1 and the soonest my end date is allowed to be is Dec 14. However, I can choose Dec 13 but it fails upon submitting. If I choose Dec 14, validation passes as expected.

    Screenshot 2024-11-18 173356.jpg

    Screenshot 2024-11-18 173500.jpg

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi @jdowns1

    I hope you are doing well today.

    If I get this right your goal is to allow pick up in a maximum 14 days range, for example I can choose 2 days or 11 days.

    To achive this you need to setup dates field this way:

    DATE 1 field: limits -> Start Date – Today / offset 0 days
    DATE 2 field: limits -> Start Date – DATE 1 / offset 0 days // End Date – DATE 1 / offset 14 days

    Kind Regards,
    Kris

    Thread Starter jdowns1

    (@jdowns1)

    No, a minimum of 14 days. I believe I have it set up correctly, that’s not my question. Can you re-read my post and review the screenshots I provided?

    Plugin Support Saurabh – WPMU DEV Support

    (@wpmudev-support7)

    Hello @jdowns1

    Hope you’re doing well today!

    I read your main query once again and from what I see the main issue you are facing is

    but the end date calendar actually lets me pick the day before (+13 days)

    Am I understanding this correctly?

    I tested the limits and offsets on my lab site and could not replicate the issue on my lab site. I set the Start date to be Today / offset 0 days and the end date limit as per the screenshot here https://monosnap.com/file/z7Y8zwdrXHQWjFpv4rndDI7hQ251EO

    Here is how the form works when I select 1st Dec as the start date: https://monosnap.com/file/EFxFVJ53motlQRQE30hohk1Z2m1tV8

    Could you please confirm if you’ve configured it the same way? If so, Ideally you should not be able to select a date that will be 13 days from the start date.

    Since I am unable to replicate the issue on my lab site with a fresh Forminator form, could you please share your form export to us? We will import it on our lab environment and check if the issue is related to a specific form.

    To share the form export
    – Navigate to the “Forminator -> Forms” page in your site’s back-end
    – click on a little “gear” icon next to the form in question
    – select “Export” option
    – copy given export code and paste it at?https://pastebin.com
    – include link to that paste in your response below.

    Note: this export will not include any data that is already submitted – they’ll stay safely on your site and we don’t need them anyway.

    Kind Regards,
    Saurabh

    Thread Starter jdowns1

    (@jdowns1)

    Yes, you understand correctly. I’m not seeing the same behavior you are, I’m able to select Dec 14 as my end date, which gives an error if I select it. Here is my form: https://pastebin.com/KPvcx2gh

    Plugin Support Zafer – WPMU DEV Support

    (@wpmudevsupport15)

    Hi @jdowns1,

    I also could not replicate the issue on my test site as well after importing your form. It is not allowing me to select Dec 14 if the first date is Dec 1.

    https://prnt.sc/QA80zViqlmXy

    Please let us know if we misunderstand the replication steps.

    Kind regards,
    Zafer

    Thread Starter jdowns1

    (@jdowns1)

    Those are the correct steps. Odd, I’m able to select Dec 14 with the same form. It must be a system setting difference between our installs I guess. I tried setting my time zone to UTC and also changed my start day of the week to Monday to match yours but that didn’t make a difference.

    Any suggestions on what to look at on my end to find the discrepancy?

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