I have the following function in Javascript
function validateDates() {
Date fromDateObj = Date.parse(GetControlDate('CalDate'));
Date toDateObj = Date.parse(GetControlDate('ToDate'));
}
The two lines are causing a syntax error saying 'missing ';' before statement'. I can't figure out what's causing this, if I replace those lines with a simple alert statement it works fine, so I know the issue is in those lines. Also replacing those function calls GetControlDate('CalDate') with an actual date string doesn't fix the issue either. Can anyone tell me what the issue is?