Telerik Forums
Kendo UI for jQuery Forum
1 answer
48 views

I had a case the other day when multiple spinners on the NumericTextBox would have been great for user input.

I.e. first spinner with step: 1, second spinner with step: 10 and third spinner with step: 100

I imagine a setup something like this:

spinners: {
  min: 0,
  max: 1000
  first: { step: 1 },
  second: { step: 10 },   
  third: { step: 100 },  
}

Georgi Denchev
Telerik team
 answered on 16 Mar 2022
1 answer
482 views

I am trying to use the kendo numeric text box (jquery), however I'm having an issue. I'm using the text box to collect the user's year of birth. This can realistically be a value between 1902 and 2022 (the current year). I set the min to 1902 and the max to 2022. The user can also choose to leave this field blank and not provide a year of birth. When a user types 19 into the field it changes it to 1902. I don't want this as the likelihood that the user's year of birth is actually 1902 is very small. Instead I would like it to blank the field out. I have tried getting rid of the min and max values but then the up/down arrows become virtually useless since the user would have to click up 1,902 times just to get to a valid value.  How can I keep the up arrows starting at 1902 and ending at 2022 while also not having kendo change the value to the min or max?

I have seen a few other posts on the topic that are old and the issue was never properly addressed. 

Georgi Denchev
Telerik team
 answered on 26 Jan 2022
1 answer
51 views

How can I render a currency when all I have is a number in cents? I've tried with factor set to 0.01 but this only works for the input once it's selected. When not selected it shows 8999,00 while when I select it, goes to 89,99.

I have a reproducer here: https://dojo.telerik.com/uDUdErOG

      $(".currency").kendoNumericTextBox({
        value: 8999,
        format: "c2",
        factor: 0.01,
        min: 0,
        max: 8999,
        step: 1,
        restrictDecimals: true,
        decimals: 2,
        spinners: false,
      });
    });

Hetali
Telerik team
 answered on 27 Oct 2021
1 answer
178 views

How to leave the NumericTextBox format in Brazilian Portuguese? I already left it that way but it doesn't work, returns the error:

Error in /turbo_modules/@telerik/kendo-intl@2.3.0/dist/npm/main.js (633:12)
NoLocale: Missing locale info for 'pt-br'

 


<template>
  <div class="example-wrapper row">
    <div class="col-xs-12 col-sm-6 example-col">
      <localization :language="'pt-br'">
        <intl :locale="'pt-br'">
          <p>NumericTextBox</p>
          <numerictextbox :default-value="123.45" :format="'c'">
          </numerictextbox>
          <p>Slider</p>
          <slider
            :buttons="true"
            :step="1"
            :default-value="7"
            :min="1"
            :max="10"
          >
          </slider>
        </intl>
      </localization>
    </div>
  </div>
</template>
<script>
import {
  IntlProvider,
  load,
  loadMessages,
  LocalizationProvider
} from "@progress/kendo-vue-intl";
import { NumericTextBox, Slider } from "@progress/kendo-vue-inputs";

import likelySubtags from "cldr-core/supplemental/likelySubtags.json";
import currencyData from "cldr-core/supplemental/currencyData.json";
import esNumbers from "cldr-numbers-full/main/es/numbers.json";
import esCurrencies from "cldr-numbers-full/main/es/currencies.json";

load(likelySubtags, currencyData, esNumbers, esCurrencies);

import esMessages from "./es.json";
loadMessages(esMessages, "es");

export default {
  components: {
    numerictextbox: NumericTextBox,
    slider: Slider,
    intl: IntlProvider,
    localization: LocalizationProvider
  }
};
</script>

Petar
Telerik team
 answered on 14 Sep 2021
1 answer
259 views

Hi,

I use a grid editable in cell like this one: https://dojo.telerik.com/@lydbell/eCAfIWUy.

The name of the fields comes from my database and is not user friendly. So I don't want it to appear in a tooltip. How to remove it completely?

If, as a last resort, it is not possible to remove it completely, I would like to modify the content. I came across this old post and the example cited doesn't seem to work.

 

 

Georgi Denchev
Telerik team
 answered on 30 Aug 2021
8 answers
2.5K+ views
Hi, 

Our whole system is design for fast data input and one requirement is that both dot and comma be accepted as decimal delimiter. Input can be both "12,12" and "12.12". It's okay if both display the afterwards, as long as the input allows for it. In fact, .NET will force you to make a choice, which is OK. 

I made a little example that showcases our need (except it doesn't deal with selection) : http://trykendoui.telerik.com/ikId/2

Is there a way to have kendo do this for us (aka without this ugly hack)? Removing all kind of culture-related formating would be a plausible option, if possible. 

Thank you

---- 

Copy of the "hack": 

01.$('#numeric').on('keydown', function (e) {
02.    if (e.which == 188) {
03.        e.preventDefault();
04.        caret = $(this).caret();
05.        value = $('#numeric').val() + '';
06.        if (value.indexOf('.') < 0 && value.indexOf(',') < 0) {
07.            $('#numeric').val(value.substring(0, caret) + '.' + value.substring(caret));
08.            $(this).caret(caret + 1);
09.        }
10.    }
11.});


Alex
Top achievements
Rank 1
Iron
 updated answer on 18 May 2021
1 answer
58 views

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?

Mihaela
Telerik team
 answered on 15 Mar 2021
1 answer
80 views

I have this code below

$("#numeric").kendoNumericTextBox({
                      min: 1,
                        max: 100,
                      decimals: 0,
                      format: "# pieces",
                      spinners: true,
                      restrictDecimals: true
                    });

 

My problem is that if user enter "0", then tab out, value changes to "1" only, not "1 pieces"

So it does not follow the format if the entered value is below the min. No problem if value is more than max.

My version is "2018.3.1017", upgrade is not an option.

Do you have a workaround on how to force to change the display value with format (may be on the onblur event perhaps)?

Mihaela
Telerik team
 answered on 11 Mar 2021
11 answers
236 views

Hello,

I am using the numeric text box as a percentage input with a factor of 100.Typing '100' into the form field produces '100%' as expected. When I submit the form via an Ajax request, '100' is sent back to the server instead of '1'. I inspected the numeric text box element to find the value attribute is '100'. When I inspected the widget via .data('kendoNumericTextBox') the value is '1'.

Is this expected? Shouldn't Kendo make sure the value attribute on the element is the same value as the widget?

Thanks

Eyup
Telerik team
 answered on 10 Feb 2021
21 answers
2.2K+ views
How can I select the textbox's contents when it receives the focus.  Ordinarily, I would call select() within jQuery's focus event handler.  However, this does not work with the numeric textbox.  I presume this is because the input that ultimately receives focus has style display:none when the page is loaded.
Tsvetomir
Telerik team
 answered on 07 Jan 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?