v-money icon indicating copy to clipboard operation
v-money copied to clipboard

Error when price has 1 decimal digit

Open thiagohk opened this issue 6 years ago • 4 comments

When the price is 50.1, for example, is being formatted as 5,01. Running example https://jsfiddle.net/znewk1jb/

thiagohk avatar Mar 01 '19 22:03 thiagohk

Yes - in my case I have to use number_format($this->price ,2) in my API resource (PHP) to get this working. It's a ugly workaround, would love to see a fix :-)

ahoiroman avatar Mar 25 '19 21:03 ahoiroman

same problem here, '895' comes wrong 8.95! I don't know how can I fix it... Or how can I formatter a v-model money value using other way...

LeticiaLCavalcanti avatar May 20 '19 12:05 LeticiaLCavalcanti

For "fix" this problem you can use this: let numberValue = 5200; (parseFloat(numberValue)).toFixed(2);

will show: 5,200.00

hawkapparel avatar Nov 02 '20 13:11 hawkapparel

hey guys, Unfortunately I don't think support will come soon. This repo seems to be abandoned! I decided to upgrade this package to be used with Vue3.

Welcome v-money3!

I'm interested to maintain v-money3 for vue 3 and beyond. Feel free to open this same issue there if you are planning to upgrade your project.

jonathanpmartins avatar Aug 28 '21 03:08 jonathanpmartins