I have looked over many pages helping with the jquery datepicker not being functional on cloned rows, but I can't seem to translate any of the suggestions I found to my particular case. Here's the Fiddle link: http://jsfiddle.net/d4oc7L8p/61/ Any advice would be appreciated.
// datepicker
$('body').on('focus', ".datepick", function() {
$(this).datepicker({
buttonImage: "${ctx }/resources/plugins/jquery-ui-1.12.1/images/calendar.png",
});
})
$("#btn_add").click(function(e) {
e.preventDefault();
var $item = $("#sample_item_wrap .tr_item.sample").clone().removeClass('sample');
$item.find("input").val("");
$("#list_wrap").append($item);
})