objectivehtml / FlipClock

http://flipclockjs.com/
MIT License
2.74k stars 954 forks source link

what's the best way to update the countdown date #327

Closed Olga--Smirnova closed 6 years ago

Olga--Smirnova commented 7 years ago

I have a list of events and need to update the countdown on event click. What's the best way to do it? Is there a way to do this without re-Instantiating of a clock?

Regards, Olga

objectivehtml commented 6 years ago

Answering old posts for others that may find them.... In the new v1 draft release, you would simple update the clock's value property and it will re-render the clock. const clock = new FlipClock(el, 0); clock.value = 10;