Closed deadcoder0904 closed 4 years ago
Please create a test case on codesandbox.io, happy to take a look
Hey @rikschennink I tried opening it in codesandbox.io but it codesandbox currently doesn't load HTML files so I created a feature request there https://github.com/codesandbox/codesandbox-client/issues/4172
If you copy-paste the above HTML in a new file inside example
folder like example/index2.html
& open it, you'll have a repro.
Otherwise if you can publish to NPM, I can create a new sandbox for the test usecase :)
@deadcoder0904 npm: https://www.npmjs.com/package/@pqina/tick
Here's a Codesandbox demonstrating the error stated: https://codesandbox.io/s/react-flip-countdown-timer-8tin3?file=/src/WorkingFlipDate.js
Check the last counter displaying lots of NaN
s. If you remove "Y", "M"
from the format
, it'll work.
Try changing
const counter = Tick.count.down(value, {
format: ["Y", "M", "d", "h", "m", "s"]
});
to
const counter = Tick.count.down(value, {
format: ["d", "h", "m", "s"]
});
to make it work :)
You need to use lowercase Y
const counter = Tick.count.down(value, {
//format: ["Y", "M", "d", "h", "m", "s"]
format: ['y','M','d','h','m','s']
});
Whoops, that did the trick 😂
The docs need to updated :)
I'm playing around with
tick
so I cloned this repo.Created a duplicate of
example/index.html
, named itexample/index2.html
& here's myHTML
:The relevant parts:
This should work as expected but displays the following instead:
If I remove
Y
&M
fromformat
, it works. If I make the year3021
, it still throws error.