-
Notifications
You must be signed in to change notification settings - Fork 119
Add formatting on input #13
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Hi @sandi-racy , I tried your code and I cannot input decimals properly. <vue-numeric
currency="$"
:format-input="true"
v-model="money"
separator=","
precision="2"
>
</vue-numeric> I also tried this approach before, formatting on input will affect decimals in a weird way #8 (comment). any ideas? |
I have fixed the bug, check it out |
Oops sorry, I never tested it using currency |
The component cannot accept default value from v-model, it keep showing <template>
<div id="app">
<vue-numeric
currency="$"
:format-input="true"
v-model="money"
separator="."
precision="2"
>
</vue-numeric>
</div>
</template>
<script>
import VueNumeric from 'vue-numeric'
export default {
name: 'app',
components: {
VueNumeric
},
data () {
return {
money: 1000 // Default value
}
}
}
</script> |
I found another bug, when I accidentally press non numeric button on my keyboard such as alphabet the input show |
I have fixed the bugs, check it out and let me know if you find any bugs |
I found another one, try ctrl+A to select whole input and press backspace/delete |
I just add contribution guidelines make sure to check it out :) |
I have fixed the bug and have added some tests |
Nice @sandi-racy , it's good to merge now. one last thing, IMO the props edit:
|
Closing due to inactivity. |
Hi @kevinongko!
I created a feature that allows users to perform formatting during input