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:
@@ -42,7 +42,7 @@ function sp_viewport() {
|
|||||||
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
|
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
|
||||||
|
|
||||||
// Output the result
|
// 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' + hours).slice(-2)+" <small>" + localized_strings.hrs + "</small></span> "
|
||||||
+ "<span>"+('0' + minutes).slice(-2)+" <small>" + localized_strings.mins + "</small></span> "
|
+ "<span>"+('0' + minutes).slice(-2)+" <small>" + localized_strings.mins + "</small></span> "
|
||||||
+ "<span>"+('0' + seconds).slice(-2)+" <small>" + localized_strings.secs + "</small></span>" );
|
+ "<span>"+('0' + seconds).slice(-2)+" <small>" + localized_strings.secs + "</small></span>" );
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ if ( $link_events ) $title = '<a href="' . get_post_permalink( $post->ID, false,
|
|||||||
</h3>
|
</h3>
|
||||||
<?php
|
<?php
|
||||||
if ( isset( $show_date ) && $show_date ):
|
if ( isset( $show_date ) && $show_date ):
|
||||||
if ( $event_date ):
|
if ( isset( $event_date ) ):
|
||||||
?>
|
?>
|
||||||
<h5 class="event-date sp-event-date">
|
<h5 class="event-date sp-event-date">
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
Reference in New Issue
Block a user