Text format of whole number changes when clicked

2 posts, 1 answers
  1. zhivko.zhelezov
    zhivko.zhelezov avatar
    31 posts
    Member since:
    May 2011

    Posted 18 Jun Link to this post


    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,


  2. Answer
    Stefan avatar
    200 posts

    Posted 21 Jun Link to this post

    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.


    Let me know if you need additional information.

    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Back to Top