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

  • brookdando
    Asked on October 30, 2018 at 2: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

  • Kiran Support Team Lead
    Replied on October 30, 2018 at 8: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! 

  • brookdando
    Replied on October 30, 2018 at 2: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.


  • AshtonP
    Replied on October 30, 2018 at 4: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 Screenshot 10

    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 Screenshot 21

    Handling Removal Date validation - 

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

    71271 Screenshot 12 Screenshot 32

    Now create a condition as below -

    71272 Screenshot 13 Screenshot 43

    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.