In this function, of the Database I bring the date value in AAAA-MM-DD
format, and what I want is that when receiving by AJAX the date format is changed to DD/MM/AAAA
.
If someone like do it without using PHP to achieve it would be a great help.
function asignar_variables_formulario_editar_pedido(co_id_compra) {
$.ajax({
type: 'POST',
url: '<?php echo base_url(); ?>co_compras/getCompra',
data: 'co_id_compra=' + co_id_compra,
dataType: 'json',
success: function(resp) {
$(".ed_fecha_pago_promesa").val(resp.co_fecha_pago_promesa);
}
});
}