Closed (outdated)
Project:
Countdown
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Feb 2009 at 02:01 UTC
Updated:
19 Oct 2021 at 19:41 UTC
Jump to comment: Most recent
I noticed that when using it for a count up function, the code does not count up, it counts down once the page is loaded.
Comments
Comment #1
ogiebobo commentedI was able to get it to work by changing the value of _countdown_direction to 1, instead of -1 in the countdown.js file. Should the code do this automatically if the date set is in the past?
Comment #2
BarisW commentedDid anyone got this working? It seems that the whole .js is prepared to work with a negative _countdown_direction, it just have to be set somewhere.
I'm not sure how to compare the current time and the displayed time in JS thought. Anyone?
Comment #3
BarisW commentedAh, I found the bug.
The problem is that countdown.js checks for a string in the html..
I changed the output of my html by overriding countdown.tpl.php
And in that file I changed the default string '@hours, @minutes, @seconds since @event' to 'You are @hours, @minutes and @seconds overdue'.
Changing the word since to overdue solved my problem, but it would be much better if the JS doesn't rely on textual strings in the code..
Comment #4
BarisW commentedAt least... you should wrap a Drupal.t() around it so these strings are translatable and the countup still works in all languages.
Comment #5
usingsession commented