You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the v2.4.0 of the library since I am getting errors in the latest one. I've set the target date to 25 December 2018, I want it to countdown from current time.
var today = new Date();
var date = new Date('December 25, 2018');
var timer = new Timer();
timer.start({countdown:true, startValues:{days:today.getDay(),hours:today.getHours(), minutes:today.getMinutes(), seconds:today.getSeconds()}, target:{days:date.getDay(),hours:date.getHours(), minutes:date.getMinutes(), seconds:date.getSeconds()}});
timer.addEventListener('secondsUpdated', function (e) {
$('#sale-countdown .days').html(timer.getTimeValues().days);
$('#sale-countdown .hours').html(timer.getTimeValues().hours);
$('#sale-countdown .minutes').html(timer.getTimeValues().minutes);
$('#sale-countdown .seconds').html(timer.getTimeValues().seconds);
});
I am getting the wrong end date. What am I doing wrong?
The v3.0.0 was throwing a Timer() is not defined error BTW. Also, VS Code was showing an error in the min file.
The text was updated successfully, but these errors were encountered:
I am using the v2.4.0 of the library since I am getting errors in the latest one. I've set the target date to 25 December 2018, I want it to countdown from current time.
I am getting the wrong end date. What am I doing wrong?
The v3.0.0 was throwing a Timer() is not defined error BTW. Also, VS Code was showing an error in the min file.
The text was updated successfully, but these errors were encountered: