I am a developer for Cognito Forms.
I was able to create a form with two date fields that will give the user the ability to enter in starting and ending dates that they worked with an employer. The only calculation that I used was to make the ending date one day after the starting date. This means that you cant select the same date or any date before the selected starting date.
The repeating section will look something like this collecting employer information and starting/ending dates.
The calculation to keep uses from selecting date from before or on the start date can be entered into the Range value "Minimum" box. I have used the advanced editor so that you can see the complete calculation.
Once this is done you can preview your form to see the date calculation in action, start by selecting a starting date. When you open the date picker for the ending date you will find that you cant select the same date or any date before the starting date.
Great question!
Dates are tricky things on the web due to a lack of an official standard for formatting. However, Cognito Forms uses the defacto standard, ISO 8601, as the format for dates in the JSON format. So in your example, the date would need to be something like "1962-03-29" in order to be processed. Also, when prefilling, the value can be a real JavaScript date, which is not supported in JSON, but is supported by prefill because it accepts a real JavaScript object.
However, this is likely not the cause of your issue. In order to ensure form field names are unique and well-formed in the JSON and code, the field label is used to create a field name that is used when writing calculations, converting to JSON, exporting to Excel, etc. So the name of your field in the JSON likely should be DateOfBirth instead of "Date of Birth".
In order to see the full structure of the form you are trying to prefill, we recommend using RequestBin to see what your form entries look like as JSON. Click on Create a RequestBin, copy the url, select Post JSON data to a website? under Submission Settings, paste the RequestBin url and save your form. Then fill out your form just like your end users would and refresh the RequestBin page to see the JSON.
Best Answer
I'm a developer with Cognito Forms.
You can use the Prefill method to pass data out of one Cognito Form, into another Cognito Form. We do have a FAQ about setting this on between two forms.