Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions docs/src/pages/vue-components/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,42 @@ moneyFormatForComponent: {
}
```

Alternatively, you can use the vue-autonumeric component for a variety of decimal numbers and currencies. See https://www.npmjs.com/package/vue-autonumeric for details. Check http://autonumeric.org/#/guide for options.

```
```html
<q-field
filled
v-model="decimalNumber"
label="Decimal number, European format, vue-autonumeric component"
hint="Mask: ###.###,##"
>
<template v-slot:control="{ id, floatingLabel, value, emitValue }">
<vue-autonumeric
ref="myDecimalNumber"
:id="id"
class="q-field__native text-right"
:options="autoNumericOptions"
:value="value"
@input="emitValue"
:placeholder="'####.###,##'"
v-show="floatingLabel"
/>
</vue-autonumeric>
</template>
</q-field>
```

```javascript
autoNumericOptions: {
decimalCharacter: ",", // European decimal separator
decimalPlaces: 2, // 2 decimals places after separator
digitGroupSeparator: ".", // European thousands separator
// Many more options available - see docs for vue-autonumeric
},
```


## Validation

### Internal validation
Expand Down