Dynamically created date picker not working from created second row:
$(document).ready(function () {
    $(".add_button").click(function () {
        var currentRow = $(this).parents("tr");
        var nr = currentRow.clone(true, true);
        nr.find(".name").val('');
        currentRow.after(nr);
    });
    $(".del_button").click(function () {
        var currentRow = $(this).parents("tr");
        if ($(".test tr").length != 2)
        {
            $(this).closest('tr').remove();
        }
        else
        {
            alert("You cannot delete first row");
        }
    });
});
<script>
    $(function () {
        $("#datepicker").datepicker({autoclose: true});
    });
</script>
 
     
    