I have a probem with ajax , If I use the following code only with PHP I show the date correctly.
<h2><span class="clock" data-countdown="{{ $subasta->data_final}}"></span></h2>
However , when I try to use this with ajax I don't show the information about the dates , but the other information load correctly.
<h2><span class='clock' data-countdown='"+response[index].data_final+"'></span></h2>
Which is the problem?
All of the ajax code
success: function (response) {
$(response).each(function(index,value) {
$(".product-image-wrapper2").append("<div class='col-sm-4' style='height:500px;'><div class='nombre'>"+ response[index].nombre + "</div><h2><span class='clock' data-countdown='"+response[index].data_final+"'></span></h2><p>"+response[index].descripcion+"<p>"+ response[index].cant_actual +"<p><a class='pujar btn btn-warning'>Pujar</a>");
$(".product-image-wrapper2").append("</div>");
});
},