Telerik Forums
Kendo UI for jQuery Forum
4 answers
394 views

How come when you tab into a numeric input the  cursor doesn't default to the end of the value in the box? Is there a way to get that behavior?

http://screencast.com/t/5GPbrxuM30

 

Srinivas
Top achievements
Rank 1
 answered on 11 Mar 2020
6 answers
55 views

Why doesn't this work? 

$('#my-kendo-numerictextbox').attr('title', '100');

Currently the title/tooltip is displaying the value the is already visible in the textbox - seriously? 

I want to be able to change the value dynamically to reflect the upper value allowed in the numeric textbox, in other words, some useful information.I'm a bit weird that way, wanting to show the users something that is actually useful...

thanks

Jose Manuel
Top achievements
Rank 2
 answered on 11 Mar 2020
4 answers
795 views
I am admittedly new to MVC and this may be something very simple that I am missing, but I am at a complete loss as to what else to do other than post here.  I have a model with a basic property called height:

public class BasicInformation
{
        [Display(Description = "Patient's height", Name = "Height (Inches):")]
        [Required(AllowEmptyStrings = false, ErrorMessage = "Height requires a value to be entered.")]
        [Range(12, 96)]
        public double Height { get; set; }
}


I am creating a new basic information and passing to the view when I call the view:
BasicInformation bi = new BasicInformation();
  
return View("Step2", bi);


Now in my view I am binding to this model using:

@(Html.Kendo().NumericTextBoxFor<double>(model => model.Height)
.Name("txtHeight")
.Decimals(0)
.Format("##")
)

My problem is that when I pass the model object to my next method, the value for height has not been updated.  The min & max seems to be working based on the range attribute from the model so it seems as though that part is connected properly.  Also if I use the basic html controls (see below) then it works fine.

@Html.EditorFor(model => model.Height)

Please explain what I am doing wrong or have not set on the Telerik control to have it save the value on the model.

Thanks in advance,
Lee 
Tsvetomir
Telerik team
 answered on 03 Mar 2020
8 answers
1.1K+ views

Greetings,

I'm using the Numeric Text Box and I want to limit the number of decimal the user is allowed to enter to a certain value, Let's say 3

I'm seeing the decimals property to 3 and the format to n3

The display is working fine but the user is allowed to input 1.999999 for example and it will be rounded to 2.000

I want it to be 1.999, either by limiting the input or, what I tried to do is forcing the value to be 1.999.

I tried using the onchange event but when the event is fired, the value is already rounded to 2.

 

Any help on this, 

Thanks,

Alex
Top achievements
Rank 1
 answered on 29 Jan 2020
1 answer
304 views
     I have a numericTextBox and I would like the user to be able to enter a percentage in either of two formats. The end result should always display the number as a percentage but store it as a decimal. For example, the user should be able to either enter .10 or 10% in the box. The screen should then show 10% when the user tabs out but send .1 when the form is submitted. Here is what I have so far: 

$("#myPercentageChoice").kendoNumericTextBox({
    format: "p1",
    spinners: false,
    value: 0,
    decimals: 3
});
Nikolay
Telerik team
 answered on 06 Jan 2020
3 answers
758 views

Hi,

I have a numeric textbox inside a Grid. I would like to allow showing a "," as a separator (thousands) and also allow decimals.

In the OnEdit of the Grid, I have the following setup:

1.edit: function(e) {
2.                e.container.find("input[name^=costOperand]").kendoNumericTextBox({
3.                    min: 1,
4.                    max: 888888887,
5.                    step: 100
6.                });
7.}

 

With the above the numeric textbox doesn't allow me to type in a ",". Only decimals are allowed.

Any idea?

 

Thanks

Alex Hajigeorgieva
Telerik team
 answered on 16 Dec 2019
9 answers
1.5K+ views

I'm trying to set NumericTextBox properties dynamically and directly in the <input /> tag. However, I can get decimals, restrictDecimals and format to have effect.

Here is my template:

    <script type="text/x-kendo-template" id="tmpl">
            #
            var step = allowDecimals ? decimalStep : 1;
            var decimals = allowDecimals ? 2 : 0;
            var format = allowDecimals ? "" : "\#";
            #
            <span>#:fix#</span>
            <input class="unit-count" type="number" value="#:count#" step="#:step#" min="0" data-decimals="#:decimals#" format="#:format#" />
    </script>

Only value, step and min have effect on the configuration of the NumericTextBox.

I have tried with data-decimals="#:decimals#" and decimals="#:decimals#" with the same effect.

What properties can I set (and how) directly in the <input /> tag?

/Morten

 

 

 

Angel Petrov
Telerik team
 answered on 05 Aug 2019
2 answers
1.2K+ views

I have a problem with numerictextbox initialization. 

http://jsfiddle.net/je2vh4cL/

When I click on click span - everything is ok. Focus/click event from input generate error on Chrome/IE. Any ideas?

Michael
Top achievements
Rank 1
 answered on 15 Jul 2019
9 answers
664 views

Hi,

I use the numericTextBox in our Cordova/AngularJS application. If I focus the numericTextBox it opens the normal alpha-numeric keyboard and not the numeric keyboard like expected.

Is it possible to make that the numeric keyboard appears on focus?

With best regards

Johann

Tsvetomir
Telerik team
 answered on 17 Apr 2019
1 answer
40 views

Is there a way to show formatting, basically the way it shows when there is value 0 inside.

In this example, it does not show any formatting, before entering value.

 

I want it look like 0.00kg on load.

https://dojo.telerik.com/oWObuGuP

Viktor Tachev
Telerik team
 answered on 04 Apr 2019
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?