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

Change the Text Color of the NumericTextBox

Environment

ProductProgress® Kendo UI® NumericTextBox for jQuery
Operating SystemWindows 10 64bit
Visual Studio VersionVisual Studio 2017
Preferred LanguageJavaScript

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