I am using Jquery UI datepicker the code I am using is as follows
ps_jquery( ".datefield " ).datepicker({
changeMonth: true,
changeYear: true,
yearRange: "-100:+10",
});
This code is working fine half of the time. When all elements with the class .datefield initially load the script works fine. When I use ajax to return more elements and reinitialize the datepicker everything working before still works. The odd thing is that the new elements on the page open up with the datepicker but when picking on the date it doesn't populate the input field. I am currently unable to find an answer to this problem and hoping someone knows how to fix this.