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

NumericTextBox enable on init not working

3 Answers 366 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 25 Jun 2014, 10:04 AM
When creating a numeric text box with the option enable: false, the numeric text box is not disabled.
This should work according to the documentation example:

<script>
$("#numerictextbox").kendoNumericTextBox({
enable: false
});

var numerictextbox = $("#numerictextbox").data("kendoNumericTextBox");
numerictextbox.enable(true);
</script>

http://plnkr.co/edit/tfsrw5ajeQh1nzTBFolr

Does anybody have an idea what the issue could be?

3 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 25 Jun 2014, 11:13 AM
Hello Ben,

The NumericTextBox does not support enable configuration option, as it can be seen in API documentation. If you would like to disable widget on init, then just add disabled attribute to the original input element:
<input id="numerictextbox" disabled />
<script>
$("#numerictextbox").kendoNumericTextBox();
</script>

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Ben
Top achievements
Rank 1
answered on 25 Jun 2014, 01:47 PM
Hi Georgi,

That's what I thought, but in the example for the 'enable' method it clearly states that the options is passed as false and then enabled via the method.  So that is wrong and misleading in the example.

http://docs.telerik.com/kendo-ui/api/web/numerictextbox#methods-enable

Regards,
Ben
0
Georgi Krustev
Telerik team
answered on 25 Jun 2014, 02:48 PM
Hi Ben,

Yes, you are absolutely right. We will address the issue right away. Thanks for noticing it.

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