- BorisAnswered on September 01, 2016 at 10:32 AM
Yes, we can achieve your requirement by using a Form Calculation field to calculate the difference between the two date fields, and a Text field to display an error message to your users if the difference is less than 1 day..
Step 1. We need to add a Form Calculation, and set it to calculate the "Date of Return minus Date of Departure":
We can set this field as hidden, so that it does not confuse your users:
Step 2. We should add a Text field, which will contain the error message you want to show to your users when they pick the arrival date that is prior to departure:
Step 3. Finally, we use a single show condition to display our custom error message if the calculation is less than 0, meaning the arrival date is not after the departure date:
This rule should also have a hide action added, where it hides the Submit button during the error:
You can see a demo form with these steps applied here:
Please try the above steps, and if you need further assistance, please let us know.