Hi,
why don't you use the built-in questioin type "date/time"?
Here all your requirements are built-in
For the first start date (Q1a) set a Mindate of "date(Y-m-d)"
For the first end date (Q1b) set Mindate to the value of Q1a
2. Period:
start date: Mindate=Q1b
end date: Mindate=Q2a
...
To join the questions a used the css class "no-bottom".
Put this into your "custom.css" and add the css class "no-bottom" to the first of the two questions
Reference to another date/time question : AnotherDateQuestion (using the question code);
Expressions : With expressions, a minimum date can be dynamically calculated. For example, you can use a date from a previous answer + 3 days as a minimum for the present question by entering: date("Y-m-d",strtotime(departuredate)+3*60*60*24).
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Thank very much for your time!
In the end I quit using a date range picker and I decided to go with an Array question. For the statistic it's better this way.
Everything is going pretty smooth, but still I have a problem with Question validation equation. As you can see in the attached survey I want to use 4 tokens, so that each participant will have it's own values.
But let's just focus on first 2 tokens. The first token is a minimum value and the second token is the maximum value that will be mandatory for each participant. The idea is that the sum of responses on the first column to be bigger or equal with min value and smaller or equal with the max value.
For example if the min value will be 2 and the max value will be 32 and if I select only 4 answers on the first column, the question will be in "red" because for some reasons it will compare only with the first digit from the max value; 4 <= 3. The only time the question will be in "green" is when he sum is equal with 2, 3 and from 20 to 32.
If I use for example min value 4 and max value 21 it will be even worse.
If in the Question validation equation I use numbers instead of tokens, it will work fine.
Please, if you encounter this situation in the past can you show the right way. It's not excluded that I use the wrong equation.