Comments (6)
Please create a test case on codesandbox.io, happy to take a look
from tick.
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']
});
from tick.
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 codesandbox/codesandbox-client#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 :)
from tick.
@deadcoder0904 npm: https://www.npmjs.com/package/@pqina/tick
from 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 :)
from tick.
Whoops, that did the trick 😂
The docs need to updated :)
from tick.
Related Issues (7)
- Publish on NPM HOT 21
- Uncaught TypeError: Cannot read property 'root' of null HOT 2
- dangling requestAnimationFrame loop causes high CPU usage, even after it is destroyed
- Transitions cannot be changed
- How to get extension "dots"... Error: Can't get extension with name "dots", "dots" is not available HOT 2
- Resizing the browser causes counter to start infinitely HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tick.