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 },
}
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.
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,
});
});
How to leave the NumericTextBox format in Brazilian Portuguese? I already left it that way but it doesn't work, returns the error:
<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>
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.
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.
});
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?
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)?
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