New to Kendo UI for jQuery? Download free 30-day trial

Change the Text Color of the NumericTextBox

Environment

Product Progress® Kendo UI® NumericTextBox for jQuery
Operating System Windows 10 64bit
Visual Studio Version Visual Studio 2017
Preferred Language JavaScript

Description

How can I change the color of a Kendo UI for jQuery NumericTextBox value?

Solution

The following example demonstrates how to achieve the desired scenario.

<input id="numeric" value="10" />
<script>
$(function() {
    var widget = $("#numeric").kendoNumericTextBox().data("kendoNumericTextBox");

    //find the wrapper of the widget
    //get all input elements, as the widget creates two - for formatted value and real value
    //set text color

    widget.wrapper.find("input").css("color", "red");
});
</script>

See Also

In this article