I want to add Jquery date picker to input elements created from for loop in PHP.
Say i use 'for' loop and generate 5 input elements:
for($i=0;$i<=5;$i++)
{
echo '<input class="datepicker_input"/>';
}
Now if i try attaching JQuery date picker
$(window).load(function(){
$(".datepicker_input").datepicker();
});
This makes datepicker option to displayed to all elements generated, but when I select the second input and change date, the first input gets changed and the event is not binded to other input elements.
How can we make date picker option to be applicable to all input elements..
.in the class selector it is fine jsfiddle.net/arunpjohny/Ht74L/1