This is a migrated thread and some comments may be shown as answers.

Text format of whole number changes when clicked

1 Answer 331 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
zhivko.zhelezov
Top achievements
Rank 1
zhivko.zhelezov asked on 18 Jun 2016, 01:06 PM

Hello,

Let us suppose we have a format n2 and decimals set to 2.

Now If we have some whole number in the text field for example 90.00 it is shown as "90.00". But if we click into the field it is shown as "90". 

Actually the format changes from '##.00' to '##' when the numeric textbox is clicked. We tried to changed the 'format' and 'decimals' property but still if we have a whole number then all zeros after decimal point are cut when we click in the text field.

We need to keep these zeros after clicking, how could this be achieved

 

Thank you,

Regards

1 Answer, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 21 Jun 2016, 03:24 PM
Hello Zhivko,

The Kendo UI NumericTextBox uses two input elements. The first one is holding the actual numeric value and the second one is displaying the formatted one. By design when the widget is focused (clicked) the input that holds the actual value is displayed, and the second one that is formatted is hidden. That is why the format of the value is changed when the user clicks on it.

There is no way out of the box to format both inputs, so the displayed value stays the same.

There is already a similar request in our UserVoice portal. You can vote for it and based on its popularity, we may implement it in a future release.

http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback/suggestions/6696197-numerictextbox-should-display-decimal-portion-even

Let me know if you need additional information.

Regards,
Stefan
Telerik
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
NumericTextBox
Asked by
zhivko.zhelezov
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or