Smart UI Components & Libraries – Grid, Scheduler, Gantt, Kanban for Angular, React, Next.js, Vue, Blazor, JavaScript › Forums › Editor & Inputs › Numeric textbox, integer format, behaviour Tagged: Numeric textbox This topic has 1 reply, 2 voices, and was last updated 2 years, 1 month ago by svetoslav_borislavov. Viewing 2 posts - 1 through 2 (of 2 total) Author Posts October 12, 2023 at 10:52 am #108961 tbettinazzi@axioma.itParticipant Using numeric textbox with an integer format if I write a float number (say 1.7) the number is rounded to 2. Is it possible to avoid the introduction of ., etc.. if format is integer in order to avoid rounding ? Tks October 13, 2023 at 7:54 am #108970 svetoslav_borislavovParticipant Hi, You can prevent the addition of chars that are not Numbers this way: const input = document.querySelector(“#integer-input”); input.addEventListener(‘keydown’, function (event) { if(isNaN(event.key) && event.key != ‘Backspace’) { event.preventDefault() } }) This way, the user will not be able to add , or . Best Regards, Svetoslav Borislavov Smart UI Team https://www.htmlelements.com/ Author Posts Viewing 2 posts - 1 through 2 (of 2 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In With Google Log In