As for the headers error you are getting this can also happen when an error occurs on the page, it is actually the printing of the error message itself that is the output that has occurred.
As for the error that is specified here is the line of code:
if (preg_match("/".$dateFormatStr."/i", $value)==0) {
Based on what you are getting in the error I'm wondering if there is a problem with what has been specified as the date format when applying a validation to the field in your form. Did you specify a date type of validation somewhere on the form? If so how did you set this up?
The error seems to be that there is an '(' in here somewhere that does not belong.