Working with General Visual Components > Classes > Combo > Combo.getMaskEdit
getMaskEdit();
The getMaskEdit method gets data entry editor for data corresponding to a specific template.
The method is used together with the Combo.UseMask and Combo.EnableEdit properties.
To execute the example, connect links to the PP.js library and to the PP.css visual styles table. Place the Combo component on the HTML page and set a mask the editor to enter data for the component.
<script type="text/javascript">
var Combo = new PP.Ui.Combo({
ParentNode: document.getElementById("Combo1"),
EnableEdit: true,
Width: 100,
UseMask: true});
var MaskEdit = Combo.getMaskEdit();
MaskEdit.setRegExpContent("^(0[1-9]|1[0-9]|2[0-9]|3[0-1])\\.(0[1-9]|1[0-2])\\.(19\\d+|20\\d+)$");//Regular expression for mask.
MaskEdit.setMask("__.__.____");//Pattern for the data entry.
</script>
After executing the example the editor for data entering is installed to the entry line:
If the value is set correctly (it corresponds to the regular expression) then color indicator of the incorrect entry vanishes:
Seebsp;also: