Hello, i'm trying to using the countdown on index-events.html but when i set the date the countdown is one month late. If i set the date to tommorow it will say it's in thirty days. I don't know how to fix that. Thx for your help!
Countdown one month late
1 reply · opened Dec 20, 2019
NNauarDec 20, 2019
SSemicolon WebSTAFFDec 20, 2019
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 use 11 for December. You will need to use the following code:
var newDate = new Date(2019, 11, 25);This will definitely work fine. Hope this Helps!
Let us know if we can help you with anything else or if you find any further 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