Fix the "The Countdown timer does not show the first number in the DAY field" bug when the day was 3digits

This commit is contained in:
savvasha
2018-10-01 10:09:22 +03:00
parent d83abf4b12
commit b76b506a35
2 changed files with 2 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ function sp_viewport() {
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
// Output the result
$this.html("<span>"+('0' + days).slice(-2)+" <small>" + localized_strings.days + "</small></span> "
$this.html("<span>"+('0' + days).slice(-3)+" <small>" + localized_strings.days + "</small></span> "
+ "<span>"+('0' + hours).slice(-2)+" <small>" + localized_strings.hrs + "</small></span> "
+ "<span>"+('0' + minutes).slice(-2)+" <small>" + localized_strings.mins + "</small></span> "
+ "<span>"+('0' + seconds).slice(-2)+" <small>" + localized_strings.secs + "</small></span>" );