As the subject says, I'm looking for the recommended way to clone existing DateTimePicker controls at run time so that users can create as many controls as are necessary.
Our application allows users to clone rows of data that contain both DatePickers and DateTimePickers. We recently upgraded from a previous version of Kendo UI to 2022.3.1109 and now the code that used to work does not.
If we don't execute the following, the look and feel is correct (but nothing happens when either the date or time controls are clicked):
If we do execute the above, the control appears as shown in the second row below...
...and the following error appears in the console:
I am able to create cloned fields if I write the appropriate HTML from scratch (e.g., embed a constant in the JavaScript function), but there's other logic that's fired that we need to take care of so that's not optimal.
I've also tried getting the options from the original control and applying them to the cloned control, but that also doesn't work, nor does attempting to destroy the control via $("#controlName").data("kendoDateTimePicker").destroy(). (My guess is that the underlying Kendo logic doesn't know about the cloned controls so the calls fail.)
Any help on what the best practice is would be greatly appreciated!