Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zeroPadLength for days #18

Closed
lucasdeassis opened this issue Aug 27, 2018 · 1 comment
Closed

Add zeroPadLength for days #18

lucasdeassis opened this issue Aug 27, 2018 · 1 comment

Comments

@lucasdeassis
Copy link

When using countdown, zeroPadLength is not applied for days as it's described in

This option defaults to 2 in order to display the common format 00:00:00 instead of 0:0:0. If the value is higher than 2, only the hour part (never days) will be zero-padded while it stays at 2 for minutes as well as seconds.

In my case, in order to pad days as well I had to do:

const renderer = ({
    days, hours, minutes, seconds,
  }) => (
    <span>
      {zeroPad(days, 2)}:{zeroPad(hours, 2)}:{zeroPad(minutes, 2)}:{zeroPad(seconds, 2)}
    </span>
  );

It would be great if we had a param for applying zeroPad in days as well, instead of having to define a renderer function just for that.

@ndresx
Copy link
Owner

ndresx commented Dec 30, 2018

This has been fixed with the latest release, thank you!

@ndresx ndresx closed this as completed Dec 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants