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://bossanova.uk/jsuites/v3/jsuites.js"></script>
<link rel="stylesheet" href="https://bossanova.uk/jsuites/v3/jsuites.css" type="text/css" />

<input data-mask='U$ #.##0,00'>

</html>

Input mask options

Method Description
aAny letter
0Any Number
#.##Formatted number
#,##Formatted number
# ##Formatted number
yyyyYear four digits
yyYear two digits
mmMonth
ddDay
hh24Hour 24
hhHour 12
miMinutes
ssSeconds
\aLetter "a" (escape for a)
\0Number "0" (escape for 0)
[-]Number signal (- or +)