Issue with KendoNumericTextbox in KendoWindow

233 views Asked by At

I'm trying to create a modal window with a kendo textbox on fly, the text box is added successfully into the form but its validation rules do not work. The source code is available here. Is it possible to resolve this issue?

The container is

<div id="wnd"></div>

The text box is created with the code:

var numeric = $('<input>').kendoNumericTextBox({
min: 0,
max: 32767,
format: "#",
decimals: 0,
value: 10
});
var container = $("<div>").append(numeric);

then its content is is into the kendowindow

var content = $("<div>").append(container ).clone().wrap('<form>').parent().wrap('<p>').parent().html();
wnd.content(content);
wnd.center().open();
1

There are 1 answers

0
Frederic On

Create the kendoNumericTextBox after you used clone(), not before.

http://jsfiddle.net/3rbj9yks/5/