loicroot / jquery-countdown

Automatically exported from code.google.com/p/jquery-countdown
0 stars 0 forks source link

Problem by days > 100 -> seconds jump from 00 to 99 (instead to 59) #37

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
There is a problem when days > 100
(see http://silvester.com.de)

The seconds jump from 00 to 99 (and not to 59)

All browsers

Original issue reported on code.google.com by a.sokolo...@googlemail.com on 13 Jan 2012 at 10:15

GoogleCodeExporter commented 9 years ago
Bonjour,

I had this problem too, but only for IE , I resolved this by replacing line 48 :
options.format[i] by options.format.charAt(i)

IE don't know how to read array apparently.
Good luck.

Enrick 

Original comment by enrikgru...@gmail.com on 19 Jun 2012 at 3:48

GoogleCodeExporter commented 9 years ago
Hey,

The fix doesn't work for me. Any other ideas?

Damon

Original comment by damongol...@gmail.com on 30 Sep 2012 at 6:46

GoogleCodeExporter commented 9 years ago
Hi,

add this line "var f = options.startTime.length + 1;" after line 28 "var c = 
0;" and change line 31 to "for (var i = 0; i < f; i++)"

Tom

Original comment by colorfl...@googlemail.com on 22 Feb 2013 at 3:08

GoogleCodeExporter commented 9 years ago
Hey guys!

The problem occurs when you add more than 99 days, 

startTime: "001:00:00:10",
format: "ddd:hh:mm:ss",

the even and odd elements of the array don't fit with the code.

at lines -> 48, 49 and 57 you have to write "c % 2 == 1" instead of "c % 2 == 0"

I've found another problem, when the days counter goes from 1 to 0, the hours 
counter goes from 00 to 24 wich is wrong, it should go to 23 (23:59:59). You 
can fix it writing "digits[c].__max = (c % 2 == 1) ? 2: 3;" instead of 
"digits[c].__max = (c % 2 == 1) ? 2: 4";

I'm still testing it but by now it's working.

Alex

Original comment by alejandr...@gmail.com on 23 Feb 2013 at 5:09

GoogleCodeExporter commented 9 years ago
Alex, I don't see that line your talking about at the end?

digits[c].__max = (c % 2 == 1) ? 2: 4

I want to make sure I'm fixing the right line.

Gerald

Original comment by gdeleon...@gmail.com on 1 Mar 2013 at 4:17