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

How to Disable Kendo numeric text box uparrow and downarrow

1 Answer 1014 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
Shankar
Top achievements
Rank 1
Shankar asked on 14 Feb 2013, 07:51 AM
Hi,
I have a set of rules like.
Allow to increase value ,
Allow to decrease value.

If we set above rules to false then I should prevent user increasing /Decreasing value from KendoNumericTextBox.

So how can I achieve this?

Code Example:

HTML Code:

<input class="inputMyCall" id="${Id}" type=number min=1 />

JS Code:
_InputMycallObj=$(".inputMyCall").kendoNumericTextBox({

         format: "#",

         spin: OnMyCallsChanged,

     }).data("kendoNumericTextBox");

Please advice.

Regards,
Shankar

 

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 15 Feb 2013, 03:33 PM
Hello Shankar,

To enable/disable the spin arrows according to a boolean value, you could bind to their mousedown event and prevent the default action when needed. I am attaching an example which demonstrates the described approach. In the sample file I am also preventing the press of the up and down key arrows along with the spin arrows. 

 
Please let me know if this covers your scenario.

All the best,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
NumericTextBox
Asked by
Shankar
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or