Skip to main content

I’m getting this error from a line in a script:

Uncaught TypeError: jsloopStartDateTime.getDate is not a function

from this line:
var jsloopStartDateTime = skuid.time.parseSFDateTime(loopStartDateTime);
jsloopStartDateTime.setDate(jsloopStartDateTime.getDate() + 7);

Any tips?


Details: this script has run perfectly for months until 8/26. I tried updating to the current version of Skuid, but it didn’t address the issue.

bump^


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:


var jsloopStartDateTime = skuid.time.parseSFDateTime(loopStartDateTime) || new Date();


Reply