Git Product home page Git Product logo

Comments (6)

rikschennink avatar rikschennink commented on August 22, 2024 1

Please create a test case on codesandbox.io, happy to take a look

from tick.

rikschennink avatar rikschennink commented on August 22, 2024 1

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.

deadcoder0904 avatar deadcoder0904 commented on August 22, 2024

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.

rikschennink avatar rikschennink commented on August 22, 2024

@deadcoder0904 npm: https://www.npmjs.com/package/@pqina/tick

from tick.

deadcoder0904 avatar deadcoder0904 commented on August 22, 2024

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 NaNs. 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.

deadcoder0904 avatar deadcoder0904 commented on August 22, 2024

Whoops, that did the trick 😂

The docs need to updated :)

from tick.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.