DatePicker identify input elements via id, the following concept is to post-create new id before datepicker call.
$("input.calender").each(function(index, element){
if($(element).hasClass("full")){
var id = $(element).attr('id');
$(element).attr('id', id+'_'+index);
$(element).datepicker({
dateFormat: "yy-mm-dd",
changeYear: true,
changeMonth: true
});
}
});
No comments :
Post a Comment