1

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>
The_Black_Smurf
  • 5,178
  • 14
  • 52
  • 78
gojila
  • 11
  • 4
  • 1
    `format` - Specifies the number format used when the widget is not focused. (http://docs.telerik.com/kendo-ui/api/javascript/ui/numerictextbox#configuration-format) – Gene R Jan 20 '16 at 09:14

1 Answers1

1

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.

The_Black_Smurf
  • 5,178
  • 14
  • 52
  • 78
  • maskedTextBox has size limit. As you need to specify the format (ex: [##.##] ), then the input will be restricted to 5 characters only including dot(.) seperator. – Mohamed Alikhan Sep 27 '17 at 20:11