I have to add multiple date field using add more image, but when i click "Date field" calender appears.
But when i add more date fields (Date 2,Date3...).Calender not appears in that date fields.
No errors throughs in firebug.
My code is here.Please refer atachment.Calender not showing in "Date 2" text field.
<script>
$(function() {
$(".dp").datepicker();
});
fields = 2;
function addInput()
{
document.getElementById('text').innerHTML += "<div class='form-group' id='group_"+fields+"'><label class='col-sm-3 col-md-3 col-lg-2 control-label'>Date "+fields+":</label> <input id='date_"+fields+"' class='dp' type='text' placeholder='Date'> <input type='image' value='Remove' src='img/remove.png' onclick='removerow("+fields+");' height='25px'></div></div>";
document.getElementById('count_off').value=fields;
fields += 1;
}
</script>
<div>
<input id='date_1' class='dp' type='text' placeholder='Date'>
<a href="javascript:void(0);" id="addButton" onclick="addInput();">
<img src="img/addmore.png" width="" height="25px"></a>
</div>
<div id="text" ></div>
