Author: | fiestah |
---|---|
Official Page: | Go to website |
Publish Date: | November 20, 2014 |
License: | MIT |
Description:
An AngularJS directive that formats and validates monetary inputs in “xx.xx” format (some additional work is needed for “xx,xx” European formats). Note that this is not designed to work with currency symbols. It largely behaves like Angular’s implementation of type="number"
.
Features:
- Prevents entering non-numeric characters
- Prevents entering the minus sign when
min >= 0
- Supports
min
andmax
like in<input type="number">
- Rounds the model value by
precision
, e.g.42.219
will be rounded to42.22
by default - On
blur
, the input field is auto-formatted. Say if you enter42
, it will be formatted to42.00