Comments (6)
You can prevent '-' key from propagating by adding an event handler to your input element, for example like this:
@keydown="$event.key === '-' ? $event.preventDefault() : null"
from v-money.
still relevant in 2021
from v-money.
Seems like downgrade to 0.7 is the only way to now
from v-money.
hey @ortonomy,
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.
Negatives numbers can be blocked using the disable-negative
property on the component. Feel free try it out!
Open a issue there if requirements don't meet your expectations.
from v-money.
You can prevent '-' key from propagating by adding an event handler to your input element, for example like this:
@keydown="$event.key === '-' ? $event.preventDefault() : null"
This can lead to false validation cause you can copy/paste a negative value
from v-money.
You can prevent '-' key from propagating by adding an event handler to your input element, for example like this:
@keydown="$event.key === '-' ? $event.preventDefault() : null"
This can lead to false validation cause you can copy/paste a negative value
I used this and it disallows copy and pasting
@copy.prevent
@paste.prevent
from v-money.
Related Issues (20)
- campo de preço sem a opção do usuário colocar os centavos HOT 1
- I'm new here: How to install? HOT 2
- Not working with big Integer HOT 2
- How to associate with a label? HOT 1
- v-money deprecated? HOT 4
- Having numbers in suffix property it gives me an infinite loop HOT 2
- toFixed(x) for non-masked values HOT 1
- Update values of child component with v-money HOT 2
- Support for Vue3 (with v-money3) HOT 1
- Error on null value and do not return Empty String HOT 2
- How to override global options
- how to format value only for display?
- Is it possible to change the direction of the inputs from rtl to ltr?
- Decimal and thousands separator through props
- Zeros being deleted unnecessarily HOT 1
- How to apply v-money to dynamically generated inputs HOT 1
- Display decimal depois da Virgula HOT 2
- How to disabled negative number? HOT 2
- always keep the cents empty HOT 1
- support amounts with no decimal? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from v-money.