I need 1/10 and 1/100 parts of a percent in the kendo ui text box

I need 1/10 and 1/100 part of a percentage, but the kendo ui text box allows me to enter a whole percentage. I am trying to do something like thins:

$("#percent").kendoNumericTextBox({
  format: "##.0000 %"
});

but that will not work.

Any ideas?

+4
source share
1 answer

There are two possible solutions, depending on how you want to control the assigned value.

Case 1 . If you want this value to 12.3456display as 12.3456%, you must do:

$("#percent").kendoNumericTextBox({
    format: "##.0000 \\%",
    decimals: 4,
    value: 12.3456
});

Case 2 . If you want the value 12.3456displayed as 1234.5600%, you should do:

$("#percent").kendoNumericTextBox({
    format: "p4",
    decimals: 4,
    value: 12.3456
});

3. , 12.3456 1234.56%, :

$("#percent").kendoNumericTextBox({
    format: "p2",
    decimals: 4,
    value: 12.3456
});

: http://jsfiddle.net/OnaBai/4ab9Z/

+6

All Articles