Limit an End Date field's selections based on a Start Date field's input?

  • MBLicenseManager
    Asked on August 8, 2016 at 11:31 PM
    Is there another solution to limit an End Date field's selections based on a Start Date field's input?
  • jonathan
    Replied on August 8, 2016 at 11:38 PM

    Can you describe more how the date limits was suppose to work on your form.

    I checked your form https://www.jotform.com/62163902347959 and I see 2 DateTime field. A Start and an End date.

    Limit an End Date fields selections based on a Start Date fields input? Image 1 Screenshot 20

    If I understand correctly you want to limit the date range within the Start and End date input. Why can we not just put a date on both date field? (a start and an end date)

    We will wait for your updates.

     

  • MBLicenseManager
    Replied on August 9, 2016 at 10:31 AM

    Hi, 

    The goal is to prevent the user from selecting an "End Date" input that precedes the "Start Date" input.

    If the user selects 08-16-2016 for a Start Date input, the End Date input's available choices would begin on 08-16-2016 and all dates before 08-16-2016 would be unavailable; like in the screenshot below. 

    Since the "Start Date" input is a variable, the "End Date" input's start date setting, ideally, would also be a variable based on user input; not a pre-determined date.

    I've disabled the past dates, which is helpful. But a project might start 2-3 months after the date the request is submitted.

    From a user's perspective, they scroll ahead 2-3 months to get to the Start Date. Then, for the End Date, they have to click through again at least 2-3 months, probably more if the project's end date is 6-7 months after start date.

    It would be a nice feature to have. This Start Date/End Date situation is used in more than 10 forms so far.

    JotForm has been really great for our organization. Thank you for all the helpful tools and your fantastic customer service.

    Cheers.

    Limit an End Date fields selections based on a Start Date fields input? Image 1 Screenshot 20

  • Support_Management Jotform Support
    Replied on August 9, 2016 at 12:02 PM

    Thank you for the warm appreciation, it's nice to see that JotFrom has been a great tool for your organization :)

    I reviewed your previous correspondence with my colleague and I understand what you're trying to achieve.

    I've disabled the past dates, which is helpful. But a project might start 2-3 months after the date the request is submitted.

    Glad you figured out that you can toggle that option to limit users from selecting past dates.

    From a user's perspective, they scroll ahead 2-3 months to get to the Start Date. Then, for the End Date, they have to click through again at least 2-3 months, probably more if the project's end date is 6-7 months after start date.

    Indeed - The good thing is, this can be overcome by setting up a condition which will copy the value of the Start Date then push it to the End Date. That way, your users won't have to re-click from today up to the future date that was pre-selected on the Start Date.

    At the moment, this is how your form works. In this example, I will be simulating the same example you have given. I'll pick a Start Date 3 months from now:

    Limit an End Date fields selections based on a Start Date fields input? Image 1 Screenshot 40

    On my cloned form where the condition was setup, this is how it looks like:

    Limit an End Date fields selections based on a Start Date fields input? Image 2 Screenshot 51

    Here's how the condition was setup:

    Limit an End Date fields selections based on a Start Date fields input? Image 3 Screenshot 62

    Here's the link to my cloned form https://form.jotform.com/62215115113944 in case you wanted to check and clone it. Please give it a spin and let us know if that fits your requirement. We'll be patiently waiting for your reply.

  • MBLicenseManager
    Replied on August 9, 2016 at 12:39 PM

    Thanks for the demo. It's so close...

    The conditional statement helps with the "jump" but the dates before the Start Date input are still available.

    Limit an End Date fields selections based on a Start Date fields input? Image 1 Screenshot 30

     

    That's why the adding the Start Date ID in the old editor was so nice. The new editor doesn't allow custom text in the "Start & End date" limits:

    Limit an End Date fields selections based on a Start Date fields input? Image 2 Screenshot 41

  • Kevin Support Team Lead
    Replied on August 9, 2016 at 2:31 PM

    The option is still there, the only difference is that will not allow you to add custom text as you did on the old wizard: 

    Limit an End Date fields selections based on a Start Date fields input? Image 1 Screenshot 60

    What you can do is use conditions to achieve it, the first that you will need to do is adding the Form Calculation widget to your form and then calculate the number of days between both dates, start and end. 

    Limit an End Date fields selections based on a Start Date fields input? Image 2 Screenshot 71

    Limit an End Date fields selections based on a Start Date fields input? Image 3 Screenshot 82

    This will calculate, and if the end data is less than the start date then the result will be, for example, -1 depending on the selected date. 

    Now, add a text message to indicate user that end date must be greater than start date: 

    Limit an End Date fields selections based on a Start Date fields input? Image 4 Screenshot 93

    The next step will be adding the condition, it should be like this: 

    Limit an End Date fields selections based on a Start Date fields input? Image 5 Screenshot 104

    Here is the link to my cloned form where I applied this, please take a look: https://form.jotform.com/62215309877966 

    Hope this helps. 

  • MBLicenseManager
    Replied on August 9, 2016 at 4:41 PM

    Thanks Kevin_G for your suggestion.

    Unfortunately, I have too many forms with a Start Date/End Date input fields to set up and maintain that many conditions.

    As long as the old editor is available, I'll stick with entering the Field ID in the "Start & End date" in the old editor.

    Please let me know if/when the new editor allows for custom text in the "Start & End date" settings.

    Thanks for your time.

  • jonathan
    Replied on August 9, 2016 at 4:53 PM

    Thank you for taking the time providing to us with more detailed explanation. It helps in understanding more about your requirement on the form.

    Since we had already submitted the ticket report to our higher team support via this thread https://www.jotform.com/answers/901256 , we will have to wait for the updates then from the developer assigned to the ticket.

    Contact us again anytime if you have other question/concern.

    Thanks.