hilios / jQuery.countdown

The Final Countdown plugin for jQuery
http://hilios.github.io/jQuery.countdown/
MIT License
2.31k stars 720 forks source link

Countdown always counts to "12:30:00" instead of certain date #245

Open NatLuder opened 7 years ago

NatLuder commented 7 years ago

Hello,

I am trying to achieve a countdown in "Hours:Minutes:Seconds" format until a certain date.

jQuery Code as follows: $("#stats").countdown("2017-02-16 12:30:00", "Europa/Berlin") .on('update.countdown', function(event) { $("#countdown_hours").text(event.strftime('%H')); $("#countdown_minutes").text(event.strftime('%M')); $("#countdown_seconds").text(event.strftime('%S')); }) .on('finish.countdown', function(event) { $("#stats").addClass("hidden"); });

stats is a section element, #countdown_hours & #countdown_minutes & #countdown_seconds are spans in the section.

Now my countdown always shows the hours which are left till the next "12:30:00", instead of all the hours until the 16th of February. What am I doing wrong here? Are weeks and days mandatory to implement? Many thanks