Display Additional Error Notification
Environment
Product Version | 2017.1 117 |
Product | Progress® Kendo UI® NumericTextBox for jQuery |
Description
How can I provide additional notification that the NumericTextBox value must be a number to the user?
Solution
- In the
document ready
event handler,append
the desiredspan
by using thek-numeric-wrap
class selector. -
Display the span when the NumericTextBox has the
k-invalid
class by using CSS.<style> span.myInvalid { position: relative; top: 30px; left: -130px; color: red; visibility: hidden; } .k-invalid>span.myInvalid { visibility: visible; } </style> <input id="textbox"> <script> $("#textbox").kendoNumericTextBox({ value: 10 }); $(document).ready(function() { $(".k-numeric-wrap").append("<span class='myInvalid'>Enter a number!</span>"); }); </script>