Counter-Up2 icon indicating copy to clipboard operation
Counter-Up2 copied to clipboard

Counter does not handle decimals correctly

Open hoermannklaus opened this issue 4 years ago • 1 comments

I setup the Counter-Up2 and came across a problem, when using decimal values.

Using the Codepen example https://codepen.io/bfintal/pen/zYzOGpZ and replacing the value 1,123,456.78 in the HTML with a decimal value "1.234" the counter starts counting up from 1 to 1000, as it interprets the number not as "1.234" but as "1234" (one thousand two hundred thirty four). The same when I exchange the dot with a semicolon.

Am I missing out on something? It said it can handle decimals.

Thanks

hoermannklaus avatar Feb 07 '22 10:02 hoermannklaus

When I replace the counterUp version in the Codepen to 1.0.1 the decimals work again. Maybe there is a bug somewhere in Version 2.

hoermannklaus avatar Feb 07 '22 10:02 hoermannklaus