MaskedTextBoxComponent
Represents the Kendo UI MaskedTextBox component for Angular.
Definition
Package:@progress/kendo-angular-inputs
Selector:kendo-maskedtextbox
Export Name:Accessible in templates as #kendoMaskedTextBoxInstance="kendoMaskedTextBox"
Syntax:
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: `
<kendo-maskedtextbox
[mask]="mask"
[value]="value">
</kendo-maskedtextbox>
`
})
export class AppComponent {
public value: string = "9580128055807792";
public mask: string = "0000-0000-0000-0000";
}
Inputs
disabled
boolean
Disables the MaskedTextBox when you set it to true (see example).
To disable the component in reactive forms, see Forms Support.
false
Sets the background and border style of the MaskedTextBox (see example). The default value is set by the Kendo theme.
includeLiterals
boolean
When true includes literals in the raw value (see example).
false
inputAttributes
{ [key: string]: string }
Sets HTML attributes for the inner input element. You cannot change attributes that are essential for component functionality.
mask
string
Sets the mask pattern for the MaskedTextBox (see example).
If you do not set a mask, the component acts as a standard type="text" input.
If the mask allows spaces, set the promptPlaceholder
to a character that the mask does not accept.
maskOnFocus
boolean
Shows the mask on focus when the value is empty.
false
maskValidation
boolean
Enables the built-in mask validator when you set it to true (see example).
true
prompt
string
Sets the prompt character for the masked value.
'_'
promptPlaceholder
string
Sets the character that represents an empty position in the raw value.
' '
readonly
boolean
When true, sets the MaskedTextBox to read-only mode (see example).
false
Sets the border radius of the MaskedTextBox (see example). The default value is set by the Kendo theme.
rules
{ [key: string]: RegExp }
Sets the RegExp-based mask validation rules (see example).
Sets the padding size of the MaskedTextBox input element (see example). The default value is set by the Kendo theme.
title
string
Sets the title attribute of the input element.
value
string
Sets the value of the MaskedTextBox.
Fields
input
ElementRef<any>
Returns the ElementRef of the visible input element.
Events
blur
EventEmitter<any>
Fires when the MaskedTextBox gets blurred.
To subscribe programmatically, use the onBlur property.
focus
EventEmitter<any>
Fires when the MaskedTextBox gets focused.
To subscribe programmatically, use the onFocus property.
inputBlur
EventEmitter<any>
Fires when the input element gets blurred.
inputFocus
EventEmitter<any>
Fires when the input element gets focused.
valueChange
EventEmitter<string>
Fires when the value changes.