Reputation: 1248
I use simple datepicker for twitter bootstrap http://bootstrap-datepicker.readthedocs.io/en/latest/
Try to clone input tag and append into another div. First input tag datepicker works perfectly. But second one(cloned input tag) isn't working at all.
I tried with this code
<div class="first">
<input type="text" class="form-control sandbox-container">
</div>
<br>
<div class="second">
</div>
$('.sandbox-container').datepicker({
});
$( ".sandbox-container" ).clone().appendTo( ".second" );
Here is the jsfiddle
Any solution?
Upvotes: 0
Views: 398
Reputation: 1306
add .datepicker
as well to your clone.
$( ".sandbox-container" ).clone().appendTo( ".second" ).datepicker({
});
Upvotes: 1