Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default value 0,00 with negative prefix #266

Open
alexalannunes opened this issue Apr 24, 2020 · 0 comments
Open

Set default value 0,00 with negative prefix #266

alexalannunes opened this issue Apr 24, 2020 · 0 comments

Comments

@alexalannunes
Copy link

alexalannunes commented Apr 24, 2020

I'd like to start maskMoney with negative values. Start with negative prefix -

<input
   type="text"
   ng-model="ds.desconto[idx_goal].desconte"
   class="form-control currency"
   placeholder="Pague R$"
   min="0"
   data-thousands="."
   data-decimal=","
   data-prefix="R$ "
   data-allow-negative="true" />

My solution

$0.onclick = function() {
  this.value = '-' + this.value
}

It works!

I'd like other way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant