-
Jim NormanAsked on April 27, 2022 at 3: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.
-
Rose JotForm SupportReplied on April 27, 2022 at 6:42 PM
Hi Jim,
You can limit the start and end date of the Appointment Field on the field's settings. Here's how:
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.
How to Post Screenshots to Our Support Forum
-
Jim_NormanReplied on April 28, 2022 at 4:27 PM
Numbers above 9 don't work for today+
-
Rose JotForm SupportReplied on April 28, 2022 at 5:55 PM
Hi Jim,
I am currently working on your concern and need more time. I will get back to you shortly. Thank you.
-
Rose JotForm SupportReplied on April 28, 2022 at 6: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.
Open the settings of the date element dedicated for today's date and set it as 'current'.
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'.
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'.
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.
Use this condition to show the error message if the user selects the appointment more than 2 weeks late.
Use this condition to show the error message if the user does not select 2 days later after today.
How to Show or Hide Fields Based on User's Answer
Here's the output:
Demo form: https://form.jotform.com/221176926830054
Please give it a try and let us know if you have any other questions.