typically that error means that jsloopStartDateTime is not a javascript datetime object. have you tried a console.log of jsloopStartDateTime between the two lines of code there? Make sure you're getting an actual date.

Could it be that loopStartDateTime isn't a salesforce datetime string?You could always try something like