jquery-countdown
jquery-countdown copied to clipboard
How do I display 3 digits for days ('ddd')?
I'd like to countdown from a date that is more than 99 days away.
I need this too. Any fix for this?
I forked this project with the change to include 3 digit days.
Interesting! i tried using it but i can't seem to get the countdown timer to work well. I want it do count down to 20th March 2016.
$(function(){
$(".digits").countdown({
image: "img/digits.png",
format: "dd:hh:mm:ss",
endTime: new Date(2016,3,20)
});
but the days seems wrong... any help?
Try this:
$(function(){
$(".digits").countdown({
image: "img/digits.png",
format: "ddd:hh:mm:ss",
endTime: new Date(2016,3,20)
});
The API is pretty explicit to the format parameter. I modified is to allow unlimited dddddd's, so you could theoretically show all days.
I was unable to find a solution so I ended up using/modifying flipclock.js
I read everything I could find here but still I only get 2 digits for days. Here's my code:
jQuery(document).ready(function($) {
$('#counter').countdown({
image: "wp-content/themes/sometheme/img/digits.png",
format: "ddd:hh:mm:ss",
endTime: new Date('12/29/16 23:59:59')
});
});
is there a way to show only days and hrs? seems like ddd:hh couting down from hours as seconds... any suggestions?
For 3 digits, try to modify this lines 148 --> if( format.indexOf('ddd') == 0 ) { 182 --> return format.replace(/(ddd|hh|mm|ss)/g, function($0, form) { 188 --> var pad = function(x){if(x > 99){return x}else{return (1e15+""+x).slice(-2)}
For me works
I'd like to countdown from a date that is more than 99 hours. Is there a way to show 3 digits hrs?
clock = $('.clock').FlipClock({ clockFace: 'HourlyCounter', autoStart: false, language: 'es', callbacks: { stop: function() { $('.message').html('The clock has stopped!') } } }); but when hours is >99 seems wrong... any help?