-
aahuja1078Asked on August 21, 2019 at 2:59 PM
I want to lock the date picker option whereby there are two date pickers as I am using for a hotel submission.
the first is for arrival date and should only show the month of June 2020, and the departure date picker should show June 2020 and July 2020.
I know there is a way to do it but I tried disabling the custom date range but having no luck, any ideas?
-
Nik_CReplied on August 21, 2019 at 4:47 PM
If you want to have those date specifically, you can use Date picker field and Limits section, for example:
Start date:
End date:
Here is the test form: https://form.jotform.com/92326828556972
Hope it helps.
Thank you!
-
aahuja1078Replied on August 21, 2019 at 6:43 PMThanks for the help, but I wanted to go one step further, when you click on
the calendar icon, I want it to automatically start in June 2020. It
currently still starts in Aug 2019 and the user has to click till June but
I need the calendar to start in June 2020 so they dont need to click.
is that possible?
Ateet Ahuja
Complete Getaways
"Creating Ridiculously Memorable Vacations"
877-530-5560
mailto:info@completegetaways.com
www.completegetaways.com
Ateet Ahuja - Ranked within Top 175 Romance Travel Sellers
... -
Girish JotForm SupportReplied on August 21, 2019 at 8:30 PM
You have two alternatives here:
Alternative I:
You can try using the Date Picker widget in the form.
Alternative II:
You can show the Arrival date from June 2020 onwards using conditional logic. To achieve this, I created one date field named as the Today's Date. I then created a text field and called it Date String 1 (this will hold the string value of the current date).
On Today's Date field, I set the default date to be today's date:
I then created the following condition, to get the string value of today's date, and save it in the Date String 1 field:
Finally, I created the last condition to add the number of days to the current date, as follows and directed the result to the Arrival date field in the form:
Related Guides for reference:
Using mathematical functions like DateString - Form-Calculation-Math-Function-Reference
Using conditions - How-to-Insert-Text-or-Calculation-into-a-Field-Using-Conditional-Logic
Here's how the form would look like after setting this up:
The field's Today's date and Date String 1, will need to be hidden in the form. A similar method can be achieved for the Departure Date field as well to start from June 2020.
Here's a cloned demo form - https://form.jotform.com/92327638941970
You could clone it and use if required - How-to-Clone-an-Existing-Form-from-a-URL
Hope this helps.
-
aahuja1078Replied on August 22, 2019 at 4:43 AMthis got me very close!! your form starts at 5/30. is there a way to ensure
that the calendar open on 6/1 or 6/15?
Ateet Ahuja
Complete Getaways
"Creating Ridiculously Memorable Vacations"
877-530-5560
mailto:info@completegetaways.com
www.completegetaways.com
Ateet Ahuja - Ranked within Top 175 Romance Travel Sellers
... -
Nik_CReplied on August 22, 2019 at 6:40 AM
You can set the custom date (if that's what you had in mind) and set it to custom one:
Is that what you wanted?
Please advise.
Thank you!
-
aahuja1078Replied on August 22, 2019 at 10:43 AMyes! thank you!
Ateet Ahuja
Complete Getaways
"Creating Ridiculously Memorable Vacations"
877-530-5560
mailto:info@completegetaways.com
www.completegetaways.com
Ateet Ahuja - Ranked within Top 175 Romance Travel Sellers
...