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

Always show decimal for whole number

1 Answer 82 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 12 Mar 2021, 01:23 PM

If I have below code 

$("#numeric").kendoNumericTextBox({
    min: 0.25,
    max: 20,
    decimals: 2,
    format: "#.00 years",
    spinners: true,
    restrictDecimals: true,
    step: 0.25
});

 

Using the spinners, if the value changes to a whole number (eg: 1, 2, 3, etc...), it shows "1", "2", etc...

I just wanted to display like "1.00", "2.00" while the input is still in focus. Is this possible?

1 Answer, 1 is accepted

Sort by
0
Mihaela
Telerik team
answered on 15 Mar 2021, 05:12 PM

Hi Daniel,

Thank you for your question.

Currently, this is not a built-in functionality of the Kendo UI NumericTextBox, but it's already submitted as a feature request in our portal feedback. You could follow the thread below to receive email notifications on status updates:

https://feedback.telerik.com/kendo-jquery-ui/1359131-numerictextbox-should-display-decimal-portion-even-when-zero?_ga=2.117391553.636630678.1615792565-1039280939.1613381964

Also, you could review the suggested workaround in the following KB article:

https://docs.telerik.com/kendo-ui/knowledge-base/numerictextbox-keep-trailing-zeros

In addition, I adjusted the example above, based on your code snippet. Check out the Dojo sample below:

https://dojo.telerik.com/omObUpIN

If you have any other questions, please let me know.

 

Regards, Mihaela Lukanova Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
NumericTextBox
Asked by
Daniel
Top achievements
Rank 1
Answers by
Mihaela
Telerik team
Share this question
or