Is there a way that start date can be referenced to another date picker?

  • Profile Image
    brookdando
    Asked on October 30, 2018 at 02:34 AM

    Hi there,

    Is there a way that start date can be referenced to another date picker e.g

    Launch Date = 18 November 2018

    in the start date it is limited to today+14 so user cannot select a closer date

    End Date = (insert end date)

    in the start date limits it would be {launchDate}+21

    effectively removing the ability to select an end date that is less than 3 weeks from the launch date entered

    Hope this makes sense

    Regards

    Brook



    This is a re-post of a comment on How to Use the Date Limits Option

  • Profile Image
    Kiran
    Answered on October 30, 2018 at 08:12 AM

    I am sorry that the requirement seems to be little confusing. Could you provide us with an example what you want to achieve so that we can guide you in the right direction? You may try creating a form to visualize your requirement that can help us.

    We will wait for your response. Thank you! 

  • Profile Image
    brookdando
    Answered on October 30, 2018 at 02:52 PM

    https://www.jotform.com/build/83025710223848

    Use this form as an example

    There are currently the following date restrictions on the form

    Launch Date =today+14 days (this works as planned)


    I need the following restrictions to be able to work

    End Date = restrictions to only allow dates to be picked that are greater than "{launchDate} at the moment you can select a date than is prior to the date picked in launch date

    Removal Date = {endDate}+7 days, at the moment you can select a date that is prior to both launch date and also end date.


  • Profile Image
    AshtonP
    Answered on October 30, 2018 at 04:51 PM

    Unfortunately, it's not possible to dynamically control the Dates based on the other date fields. However, there is a workaround that can help you put conditions in place. 

    1. Add two hidden warning Text fields on the form so if the dates are not correctly select then the warning message will appear. 

    2. Add another date picker field to calculate End Date + 7 Days 

    71269_warning_field.png

    Handling End Date validation - 

    Create a condition as below, which will show a warning message as well hide the submit button on the form. 

    This will be triggered if the End date is less than Launch Date

    71270_cond_1.png

    Handling Removal Date validation - 

    Add a new hidden date picker field and calculate End Date + 7 days. 

    71271_Screenshot_12.png

    Now create a condition as below -

    71272_Screenshot_13.png

    This will ensure the date remove date is not selected before End Date + 7 days. 

    Useful Guide - Smart-Forms-Using-Conditional-Logic 

    I hope this helps.