- Secure date input (#1574) —
hiddenInputnow conceals day/month digits too (d/Mtokens), not justX-typed placeholder digits; e.g.mask="d0/M0/0000"with[hiddenInput]="true"displays**/**/2024while the form control keeps the real date
- Fix (#1488) — the caret-shift-past-separator fix for overflowing
leadZeroDateTimedate/time fields now works for any date/time mask (M0/00,Hh:m0, etc.), not only the flagshipd0/M0/0000 - Fix (#1634) —
separatormasks withoutputTransformFnno longer emit the raw formatted display string on blur; the blur-timeleadZeroreformat now routes through the same transform pipeline as every typing-time emission, soFormControlkeeps receiving the transformed (e.g. numeric) value - Fix (#1633) —
setDisabledStatenow writes the nativedisabledDOM property synchronously; an initially-disabledFormControlno longer briefly (or persistently) leaves the native input enabled due to the deferredqueueMicrotaskwrite racing Angular Forms' synchronous init - Regression coverage (#1632) — added unit and Cypress tests locking in that retyping into a
keepCharacterPositionsslot cleared by Backspace (e.g. date maskd0/M0/0000) fills from the first typed keystroke; already fixed by priorkeepCharacterPositionscorrections, no source change needed
- Angular 22 support (#1617) — built and tested against Angular 22.0.5
- All dependencies updated to their latest versions (exact pins)
- Custom named mask aliases (#1376, #1091) —
provideNgxMask({ maskAliases: { PHONE_BR: '(00) 00000-0000' } }), works in directive and pipe, supports||multi-masks - Banking typing mode (#733, #1414, #1315) — opt-in
typeFromDecimalsconfig: digits type from the decimal end, ATM style (5→0.05→0.57→5.73) - Default value on blur (#1435) —
defaultValueOnBlurinput/config: empty inputs receive a masked fallback on blur without marking the form dirty - Configuration docs overhaul (#1529) — explicit standalone vs environment vs NgModule setup guide in USAGE/README
- Fix (#1250) — typing a second decimal marker is rejected as a no-op instead of mangling the value (
123,456,789.20stays intact) - Fix (#1590) —
showMaskTypedskeleton render no longer echoes''into the model during programmatic writes, fixing lost initial values in nested custom form controls - Pin (#1593) — integer-part deletion keeping the decimal part and caret is now covered by dedicated regression tests (behavior fixed in 21.1.0)
- Fix (#1513) —
leadZeroDateTimeno longer injects a spurious zero into months for year-first masks (0000-M0-d0:19901221→1990-12-21)
- Requires Angular 22 (
peerDependencies: ^22.0.0) and Node.js ≥ 22.22.3 / ≥ 24.15.0 / ≥ 26
- Add
CPF_CNPJ_ALPHAalphanumeric CNPJ mask (PR #1592) - Signal Forms (
[formField]) fully supported: initial values, disabled schema, dynamic masks, validation — verified equivalent to Reactive and Template-driven across all mask types
- Fix (#1601) — relax
FormValueControlsurface; no more conflicts with nativerequired/readonly - Fix (#1560) —
onChangeno longer fires duringwriteValue; programmaticsetValue/patchValuekeeps the form pristine - Fix (#1532) —
separatormask without explicit precision no longer throwstoFixed()RangeError - Fix (#1607, #1614) — directive no longer overrides
FormControldisabled state on init; initially-disabled controls stay disabled - Fix (#1355, #1578) — deleting the leading digit of a separator value no longer collapses remaining zeros (
1,000,000→000,000, consistent for all lengths) - Fix (#1512) — an explicitly bound empty
[specialCharacters]="[]"is respected instead of silently falling back to defaults - Fix (#1551) — pasting a value starting with doubled prefix characters no longer strips a prefix occurrence (regression from 18.0.1)
- Fix (#1571) — caret lands at the end after pasting into a separator mask with a prefix
- Fix (#1347) — multi-character
placeHolderCharacternow emits a one-time warning (single character required) - Fix (#1527, #1543, #1544, #1545, #1489) —
keepCharacterPositionsoverhaul: works withoutshowMaskTyped, mid-value deletion leaves placeholder gaps, selection replacement preserves layout, keystrokes are no longer eaten at special-character boundaries, plays well withleadZeroDateTime - Fix (#1615) — programmatically-set values the mask cannot process at all (e.g. sentinel strings) pass through verbatim instead of being mangled (regression from 18.0.4)
- Fix (#1547) — pasting values containing both
.and,with the default arraydecimalMarkerno longer drops digits (last marker wins as decimal) - Fix (#1516) — deleting digits before the decimal marker keeps the decimal part (
0.05→.05, no more silent value corruption) - Fix (#1572) — caret lands after the decimal marker when typing
.with a prefix andleadZero - Fix (#1611) — pasted/pre-populated dates parse correctly in month-first masks (
M0/d0/0000:01071941→01/07/1941) - Fix (#1612) —
hiddenInputwith a custom pattern symbol no longer deletes two characters on a single backspace - Fix (#1498) — masks with multiple leading literals (
+(000)...) auto-fill them again on the first typed character (regression from v17) - Fix (#1492) — numeric
FormControlvalues in exponential notation (7e-7,1e21) expand to plain decimals instead of rendering garbage - Fix (#1567) — values beyond IEEE-754 precision (>15 significant digits) no longer get corrupted by rounding (
999999999999999.99stays exact) - Fix (#1504) — selection replacement works when the value contains a literal
* - Fix (#1350) — select-all + Backspace clears the input in one press (deterministic clear, fixes Firefox)
- Fix (#1583) —
||alternation masks validate short values that complete a shorter alternative (1||0,N: single0is valid again) - Fix (#1523) — date masks with digit tokens abutting
M0/d0(00M0d0,0000M0d0) no longer misread year digits as day/month - Fix (#1519) — non-special
placeHolderCharacter(e.g.X) no longer leaks into the unmasked model value - Fix (#1495) — initial values colliding with the suffix text (
'00'withsuffix=":00") render instead of being stripped - Fix (#1573) — formatting no longer depends on the OS/browser locale (Edge with non-US regional settings altered values); configured markers are always authoritative
- Fix (#1379) — an empty mask is a true passthrough: no programmatic value rewrites, native browser validation works
- Fix (#1305, #1264) — initial values render synchronously, so Material floating labels float on init
- Fix (#1293, #1497) — Android/Samsung IME: numeric masks process composition input live (model no longer stale until blur), deletions are detected via
InputEvent.inputType(backspace works without keydown info) - Fix (#1515) — leading-optional masks (
999SSS) validate correctly: mandatory tokens are position-aware enforced instead of always passing - Fix signal forms initial value rendering unmasked for literal-inserting masks (date/time/separator)
- Fix signal forms
FormFieldecho corrupting masks with ambiguous unmasked form (IP)
NgxMaskDirectiveno longer exposeserrors,dirty,invalid,pending,readonly,required,nameinputs (Signal Forms surface reduced tovalue/disabled/touched)
- Fix (#1560)
- Fix (#1559)
- update ng 20.x
- Fix (#1481)
- Fix (#1411)
- add input property instantPrefix
- Fix (#1455)
- change @Input to input in NgxMaskDirective
- change @Output output in NgxMaskDirective
- change variables to signals in NgxMaskDirective
- update ng 19.x
- Fix (#1449)
- rename "IConfig" to "NgxMaskConfig"
- rename "optionsConfig" to "NgxMaskOptions"
- change interface to type
- Fix (#1410)
- Fix (#1342)
- Fix (#1389)
- Fix (#1389)
- Fix (#1383)
- Fix (#1358)
- update v16.4.2
- update v15.2.3
- update v14.3.3
- update v13.2.2
- update dependencies
- update dependencies
- update ng 17.x
- Upgrade version 16.4.2 with more fixes since version 17.x.x
- Fix (#1251)
- Change README.md
- Fix (#1242)
- Fix (#1238)
- Fix (#1232)
- Fix (#1225)
- update version
- Fix (#1222)
- Fix (#658)
- Fix (#1186)
- Fix (#1171)
- Fix (#797)
- Fix (#772)
- Fix (#1071)
- Fix (#1018)
- Fix (#916)
- Fix (#880)
- Fix (#1146)
- update ng 16.x
- Upgrade version 15.2.3 with more fixes since version 17.x.x
- Upgrade version 15.2.1 with more fixes since version 16.x.x
- Fix (#837)
- Fix (#1103)
- Close non public API
- Fix (#1077)
- Fix (#1069)
- Fix README.md
- separate
provideEnvironmentNgxMaskandprovideNgxMask
- update ng 15.x
- usage new standalone API
- Upgrade version 15.2.2 with more fixes since version 17.x.x
- Upgrade version 14.3.2 with more fixes since version 16.x.x
- Change MaskPipe => NgxMaskPipe
- Change MaskService => NgxMaskService
- Change MaskApplierService => NgxMaskApplierService
- Change MaskDirective => NgxMaskMaskDirective
- Fix (#1039)
- new code and styles linting rules formatting
- Fix (#1030)
- package build process
- update ng 14.2.1
- Fix (#1029)
- Fix (#688)
- Update to Angular 14
- Upgrade version 13.2.2 with more fixes since version 17.x.x
- Upgrade version 13.2.1 with more fixes since version 16.x.x
- Change MaskPipe => NgxMaskPipe
- Change MaskService => NgxMaskService
- Change MaskApplierService => NgxMaskApplierService
- Change MaskDirective => NgxMaskMaskDirective
- Fix (#648)
- Fix (#984)
- Fix (#915)
- Fixed issue where active elements within a shadowRoot would not be found by mask
- Fix (#909)
- Fix (#1000)
- Fix (#948)
- Fix (#923)
- Added lowercase and uppercase mask support
- Feature (#947)
- Ghost characters shown in input when toggling mask on/off
- Fix (#897)
- Fixed (#848)
- Function maskFilled is added
- Feature (#917)
- added triggerOnMaskChange, allow mask change to trigger onChange
- Revision for separator logic.
- Set default decimalMarker to [".",","] instead "."
- Enable non-zero-selections
- Deletion of special mask character moves just the cursor instead of deleting the character next to it
- Enable cypress component testing
- the same that in 13.0.0
- fix test
- fix CI
- up all dependencies to latest
- move from tslint to eslint
- add more strict rules for tsconfig and code quality config
- build library with IVY and new angular package structure
Fixed (#875) Fixed (#892) Fixed (#861) Fixed (#893)
Remove complet mask if part of it is deleted (#831)
Now backspace no leaves special characters (#692) (831)
DropSpecialCharacters false also should return prefix (#686) (830)
Number cast bug. Now if model value number mask should return type number (#791) (#702) (829)
Copy paste event should work as expected (#765) (827)
Difinition for form control with `{value, disable} should work (#803) (826)
Update to Angular 11
Change directive selector to restrict to input and textarea tags
Fix for #721 - prevent entering dots when decimal marker is comma
Fix for #715 - mark fields as touched on blur on form fields with an empty mask Fix for #711 - stop fields being marked as dirty after a form reset
Feature: Library updated to Angular 9 Feature: Can pass empty string for thousandSeparator if do not want any separation Fix: allowNegativeNumbers works correctly when set as true or false. If false, entering a hyphen will not be allowed Fix: stop cursor jumping around when mask is set as empty
Fix for #657 - showMaskTyped option now works correctly when set in the config Fix for #665 - validateTime mark field as invalid immediately if value is null Feature: Added new error page for handling 404's, and new bugs page for being a playground for bug fixing Breaking change: Made validation error return an object named mask. If you were previously checking for a validation error named 'Mask error' then it will need changing to just 'mask'.
Fix for #369 - add thousandSeparator to separator pipe Fix for #381 - add support to negative number in separator mask
Fix for #560 - do not overwrite the mask available patterns when patterns attribute passed in value is a falsey value i.e null/undefined/false Fix for #620 - allow delete button to work when at beginning of input and no prefix exists Fix for #621 - validation config value now works correctly
Fix for #614 - export everything from config
Fix for #580 - honour the special characters that user may have specified, and prevent runtime exception occuring Project folder structure converted over to follow Angular CLI way of libraries
Fix for #590 - Problem if prefix last char is not a number
Placeholder can now be customised
bugs fix
update separator
bugs fix [refs: #554, #580, #582]
bugs fix [refs: #579, #576, #561]
Update date and time masks [refs: #571, #567, #572, #564, #558, #573]
minor bug fixes
minor bug fixes
Issues fix
Bugs fix
Fix Backspace on empty input causes cursor to jump after entering a value
Bugfix
Fix returned value when input value type is number
Added decimal percent, fix suffix prevents decimals
Added polyfill for IE11
Fix decimals
Readme update
Secure input and bugs fix
Bugs fix
Bugs fix
Feature: added default validation
Bugs fix: fix minutes validation, '-' in separator, decimal part in separator and fix issues with FF/IE
Fix coma_separator behavior
Update dev and prod dependencies
Added coma_separator
Added decimals values for separator and dot_separator
Now separator can separate by dots
Added validation for percent
Added valid 24 hour format mask and update separator
Added new mask that separates number by thousands
Fix multiple mask when you use the same symbols bettwen *
hotfix
sufix appears while you inputing data
you can use sufix along with '*'
You can used new specialCharacters 'quotes'
You can pass into mask pattern with brackets
Fixed pattern '*'
You can select and delete value.
You can pass array of expression and custom Pattern to pipe
Fixed when page is loaded the mask is visible
Fixed writeValue in directive
Added ability to use MaskPipe/NgxMaskService inside component
Added poliffyls for IE
Added support for using 'showMaskTyped' property to see mask while typing Resolved issues
Update of demo version Added support to pass in value of type number or string Resolved issues
Add support for prefix
Add [ and ] as defoult symbols for mask
Fix shift for cursor and updated all dependencies
Add support for optional character in input '?'
Add support for multicharacter input '*'
Updated all dependencies and remove usages of rxjs