Countdown clock acting very odd

2 replies · opened Mar 24, 2017

TTone12Mar 24, 2017

Hey guys! Just purchased Canvas and I'm totally loving how flexible it is.
There appears to be something weird going on with the countdown clock, though? You can check out where I'm using it here:

http://pipesandtails.com/

Our event is on 4-29-2017. If I punch the correct date into the script area, it adds an extra 30 days (or so) onto it? I had to set it to the following:
var newDate = new Date(2017, 3, 30);
to pull up the correct number of days for the countdown. Pretty weird, huh? Am I missing something obvious?

TtrisharepMar 27, 2017

I am having the same problem.

SSemicolon WebSTAFFMar 31, 2017

Hello,

The thing is that Javascript formats the Month as following:

0 as January
1 as February
2 as March
3 as April
4 as May
5 as June
6 as July
7 as August
8 as September
9 as October
10 as November
11 as December

So you will need to choose your Months accordingly.

Hope this Helps! Let us know if we can help you with anything else or if you find any issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard