Mobile Javascript Not Working

Hi everyone!

I am creating a course that includes the mobile calculator posted here. I've updated and customized some of the Javascript, and it runs perfectly on desktop.

However, when I publish to mobile, trying to generate a date results in an "undefined NaN" error. I have turned off AMP but still get this error. Again, the Javascript works perfectly on desktop, so I know the error is not within the code itself (unless I need to add something specific for mobile).

Any assistance greatly appreciated. Thank you!

11 Replies
Russell Killips

Hi Jesse,

Take a look at this story file.

When initialising your dates you should provide a year as well. Some browsers will give the date a default year and some browsers do not.

I also noticed that a couple of Storyline variables were missing:
Date10WeeksBack and Date15WeeksBack.