gojila
gojila

Reputation: 11

how can make kendo ui numerictextbox don't lost formats when input value?

When i'm input values in kendo ui numeric, it's format has lost.

Example: 1,234,456 -> when focus show -> 123456

Can anyone help to solve this?

My code

 <input placeholder="UnitPrice" id="UnitPrice" />
 <script>
     $(document).ready(function(){
         $("#UnitPrice").kendoNumericTextBox({format: "##,##0.###"});
     });
 </script>

Upvotes: 1

Views: 1510

Answers (1)

The_Black_Smurf
The_Black_Smurf

Reputation: 5269

According to the kendoNumericTextBox API documentation

Specifies the number format used when the widget is not focused

I don't see any built-in way to accomplish this in a NumericTextBox... However, kendo also has a maskedTextBox input that may be a better fit for you. In both cases, I think you'll have to build your own wrapper around the kendo component to get the desire behaviour.

Upvotes: 1

Related Questions