We would like to have a custom date range that requires 2 days advance

  • Profile Image
    Jim Norman
    Asked on April 27, 2022 at 03:39 PM

    We would like to have a custom date range that requires 2 days advance notice, but up to 2 weeks away. For dynamic date selection, End Date +14 does not work, and anything about +9 for the end date does not work.



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

  • Profile Image
    Rose
    Answered on April 27, 2022 at 06:42 PM

    Hi Jim,

    You can limit the start and end date of the Appointment Field on the field's settings. Here's how:

    1651099010_6269c58230de4_

    If that does not answer your issue, can you take a screenshot or provide a detailed explanation of what you're trying to achieve? You can also share the URL of the form you're working on.

    Where to Find Form URL

    How to Post Screenshots to Our Support Forum


  • Profile Image
    Jim_Norman
    Answered on April 28, 2022 at 04:27 PM

    1651177651_626af8b33dad4_Screen Shot 202

    Numbers above 9 don't work for today+

  • Profile Image
    Rose
    Answered on April 28, 2022 at 05:55 PM

    Hi Jim,

    I am currently working on your concern and need more time. I will get back to you shortly. Thank you.


  • Profile Image
    Rose
    Answered on April 28, 2022 at 06:51 PM

    Hi Jim,

    Please note that you can only select dates on the limit settings of the appointment calendar and adding a formula does not work. Is your goal to make sure that the users are setting the appointment 2 days after the current date but not later than 2 weeks from the day that the form is submitted? If so, we can use multiple date picker elements on your form and use conditional logic as a workaround.

    First, we'll need to add 4 date picker elements to the form. One for the Appointment Date that will be utilized by the respondent. One for the current date, one for the date 2 weeks after the current date, and one for the date 2 days after the current date. We will need to hide the 3 fields from the form since they will only use them for the condition.


    1651185451_626b172b1938e_

    Open the settings of the date element dedicated for today's date and set it as 'current'.

    1651185635_626b17e328fff_

    Then, add these conditions, this is to add 2 days from the current date and pass the data into the date element dedicated for '2 days after today'.

    1651185701_626b18256347f_

    Add this condition to add 14 days from the current date and pass the data into the date element dedicated for '2 weeks after today'.

    1651185799_626b1887c15a0_

    How to Insert Text or Calculation into a Field Using Conditional Logic

    Then, add 2 error messages on the form using the Paragraph element. Hide both messages.

    1651185907_626b18f39bece_

    Use this condition to show the error message if the user selects the appointment more than 2 weeks late.

    1651186015_626b195f8c7ce_

    Use this condition to show the error message if the user does not select 2 days later after today.

    1651185938_626b19124ef2b_

    How to Show or Hide Fields Based on User's Answer

    Here's the output:

    1651186190_626b1a0e14c3f_

    Demo form: https://form.jotform.com/221176926830054

    Please give it a try and let us know if you have any other questions.