Directory

← Back

Masked text fields

ClientSide MaskedTextField

Author

Rating

Popularity

100+

Custom Text Field with client-side masking. Created using https://github.com/RobinHerbots/Inputmask . Supports Swing style masks javax.swing.text.MaskFormatter.

Sample code

MaskedTextField field = new MaskedTextField("####-###-###");
//.setId("...") is important and necessary
        field.setId("test");
        add(field);
new MaskedTextField(mask, allowedChars, containsLiteral, placeholder, MaskType.LAZY, MaskFormat.SWING);
For version 1.0.7 It's needed to put file jquery-loader.js to folder /frontend/src/ 
with following code:
    import * as $ from 'jquery';
    window.jQuery = $;
    window.$ = $
Version 1.0.7 is based on CustomTextField. Tested, works well enough, but, unfortunately there are no css. 
Version 2.0.7 is based on TextField. Works fine, some times some bugs with caret position. Will be fixed ASAP. 

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

minor

Released
2022-06-09
Maturity
EXPERIMENTAL
License
Apache License 2.0

Compatibility

Framework
Vaadin 14
Vaadin 14+ in 2.0.1
Browser
N/A

Vaadin Add-on Directory

Find open-source widgets, add-ons, themes, and integrations for your Vaadin application. Vaadin Add-on Directory
The channel for finding, promoting, and distributing Vaadin add-ons.
Online