I have a textbox that I am converting to calendar picker on the JS side. This control is on a Bootstrap Modal popup.
The control looks fine on the initial load , once I cancel and reopen the dialog I see additional icon getting added. The count increases every time I open the popup.
How do I prevent it from appending , I have tried setting the obj to null and recreating , but didn't work for me.
Here is my sample code
$('#editUserModal').modal('show').on('shown.bs.modal', function () {
let hiredate = new ej.calendars.DatePicker({
max: new Date()
});
// how to check here append only if already not appened ?
hiredate.appendTo('#hiredate'); // Hiredate is a text box on the modal
}