phiny1 / v-currency-field

The Vuetify Currency Field uses Vue Currency Input directive to create a currency component (<v-currency-field>)
https://phiny1.github.io/v-currency-field/
MIT License
60 stars 29 forks source link

Not computing decimal #40

Open leobezr opened 4 years ago

leobezr commented 4 years ago

Even with option autoDecimalMode set to true, v-currency-field is setting value multiplied by 100. Removing dots and commas from the number.

0,55 becomes 55,00.

Version: 3.1.0 Bug version: 3.0.8

Vue.use(VCurrencyField, { 
  locale: 'pt-BR',
  currency: "BRL",
  decimalLength: 2,
  autoDecimalMode: true,
  min: null,
  max: null,
  defaultValue: 0
})
phiny1 commented 4 years ago

@leobezr Could you create an example code with the problem? Its not happening in my tests:

Example: https://codepen.io/phiny1/pen/YzPLOam

michaelrachlitz commented 1 year ago

I just noticed this issue. We're experiencing the same as @leobezr. If we do ,30 it becomes 30,00 but if we do ,3 it works and sets ,30.

Your example @phiny1 seems to just ignore any decimal inputs and instead just leave the last 2 numbers inserted as decimals