I know we had to initialize javascript functions after the ajax call in success, but that too doesnt work in my case. Following is my code :
jQuery :
$.ajax({
type:'POST',
url:ajaxurl,
data:{
action:'get_more_posts',
},
success:function(data){
console.log(data);
$('#posts-inner-container').append(data); // data includes datepicker textbox
$('.datepicker').datepicker();
}
});