New to Kendo UI for jQueryStart a free 30-day trial

Label

configuration

Adds a label before the input. If the input has no id attribute, a generated id will be assigned. The string and the function parameters are setting the inner HTML of the label.

label

String|Function|Object

Default: null

<input id="maskedtextbox" />
<script>
    $("#maskedtextbox").kendoMaskedTextBox({
        label: "First name"
    });
</script>

The function context (available through the keyword this) will be set to the widget instance.

<input id="maskedtextbox" />
<script>
    $("#maskedtextbox").kendoMaskedTextBox({
        label: function() {
            return "First name";
        }
    });
</script>

label.content

String|Function

Sets the inner HTML of the label.

Default: ""

<input id="maskedtextbox" />
<script>
    $("#maskedtextbox").kendoMaskedTextBox({
        label: {
            content: "First name"
        }
    });
</script>

The function context (available through the keyword this) will be set to the widget instance.

<input id="maskedtextbox" />
<script>
    $("#maskedtextbox").kendoMaskedTextBox({
        label: {
            content: function() {
                return "First name";
            }
        }
    });
</script>

If set to true, the widget will be wrapped in a container that will allow the floating label functionality.

Important: The value method does not trigger the focusout event of the input.

This can affect the floating label functionality. To overcome this behavior, manually invoke the refresh method of the Floating Label: $("#maskedtextbox").data("kendoMaskedTextBox").floatingLabel.refresh();

Default: false

<input id="maskedtextbox" />
<script>
    $("#maskedtextbox").kendoMaskedTextBox({
        label: {
            content: "First name",
            floating: true
        }
    });
</script>
In this article
labellabel.contentlabel.floating
Not finding the help you need?
Contact Support