value

Gets or sets the value of the MaskedTextBox.

Important: This method does not trigger the focusout event of the input. This could affect the floating label functionality. You can overcome this behavior by manually invoking the refresh method of the Floating Label: $("#maskedtextbox").data("kendoMaskedTextBox").floatingLabel.refresh();

Parameters

value String

The value to set.

Returns

String The value of the widget.

Example - get the value of the MaskedTextBox

<input id="maskedtextbox" />
<script>
$("#maskedtextbox").kendoMaskedTextBox({
    mask: "000000",
    value: "123456"
});

var maskedtextbox = $("#maskedtextbox").data("kendoMaskedTextBox");

var value = maskedtextbox.value();

console.log(value);
</script>

Example - set the value of the MaskedTextBox

<input id="maskedtextbox" />
<script>
$("#maskedtextbox").kendoMaskedTextBox({
    mask: "(000) 000-0000"
});

var maskedtextbox = $("#maskedtextbox").data("kendoMaskedTextBox");

var value = maskedtextbox.value();

maskedtextbox.value("555 123 1234");
</script>
In this article
Not finding the help you need? Improve this article