I am building a system in which I have to register a stock plan, so far so good ...
At the time of registration there are three inputs, What, Who and When as shown below:
TheproblemiswhenIclickonthenew"When?" field, because the datepicker does not appear again ...
Followthecode:
Script:
<script>$.(function(){$(".datepicker").datepicker({});
$(".inserirItens").on('click', function() {
var inputs = "aqui eu defino o html dos meus inputs que vão ser adicionados posteriormente";
$(this).closest('.form-group').append(inputs);
});
});
</script>
HTML
<div class="form-group">
<input type="text" name="oque" class="">
<input type="text" name="quem" class="">
<input type="text" name="quando" class="datepicker">
<button class="inserirItens"><i class='icon icon-plus' ></i></button>
</div>