Skip to content

Set default value 0,00 with negative prefix #266

@alexalannunes

Description

@alexalannunes

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions