I have a form where the user can select a start date and the period of a contract. To make it easy for the user they can choose in a dropdown:
1 day
1 week
2 weeks
3 weeks
4 weeks
1 month
3 months
1 year
2 years, etc.
How can I calculate the end date from these values? I can work with options and then create an attribute for the number of days. But a month is not always 31 days and a year is not always 365 days. What to do here?
You can select in the action to start date = date time picker, and then make changes to Result of step 1 only if dropdown value was “1 day” end date = date time picker + 1 day. And the other make changes to Result of step 1 with the condition in the dropdown. And so on.
Ahhhhh thanks. So to make sure I get it. I make an attribute like this:
display - attribute 1 - attribute 2
1 day - day - 1
1 month - month - 1
3 month - month - 3
And then make actions:
date time picker + day [attribute 2] only if attribute 1 is day
date time picker + month [attribute 2] only if attribute 1 is month