I ran into this problem when creating a workflow for a standard time off type of request - there wasn't a way to force the 2nd date (in this case, the end date) to key off of the 1st, or start, date and therefore prevent the user from selecting something like 9/27/08 to 9/25/08 for his/her time off.
A coworker of mine helped me come up with a way of comparing the dates inside of the form itself, rather than looping out of the form. This way, the workflow would not progress if the end date was not greater than the start date and we can utilize custom validation to handle both the model and the error message. Consequently, the user would be required to fix the date issue right then and there.
There may be an easier/quicker way to handle this, but here's what we came up with:
In this example scenario, we will use what may be a typical structure of a user-submitted request form and a manager approval form (the latter being utilized solely for the sake of the information transmitting somewhere).
In the submission/request form, we will use a couple of labels and two date picker components, one for the "start date" and one for the "end date". The form utilizes a Submit button as its output.
We must have at least one component in the form set to Optional, so we will use the "end date" date picker component. It will be this component that will hold the custom validation.
Click to view.