Javascript input mask
Quick reference
All masks should be defined in lower case. The tokens defined in the table below can be used together to compose and force different input formats.
Basic example
<html> <script src="https://jsuites.net/v3/jsuites.js"></script> <link rel="stylesheet" href="https://jsuites.net/v3/jsuites.css" type="text/css" /> <input data-mask='U$ #.##0,00'> </html>
Input mask options
Method | Description |
---|---|
a | Any letter |
0 | Any Number |
#.## | Formatted number |
#,## | Formatted number |
# ## | Formatted number |
#'## | Formatted number |
yyyy | Year four digits |
yy | Year two digits |
mm | Month |
dd | Day |
hh24 | Hour 24 |
hh | Hour 12 |
mi | Minutes |
ss | Seconds |
\a | Letter "a" (escape for a) |
\0 | Number "0" (escape for 0) |
[-] | Number signal (- or +) |