Answers for "jquery datatable date format dd/mm/yyyy"

0

jquery datatable date format dd/mm/yyyy

// if You are using the Datatable data as json format you can format the date
// where are data is create by php With date('dd/mm/yyyy',strtotime($date));

//Another solution is 

<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/plug-ins/1.10.20/sorting/datetime-moment.js"></script>

<script>
$('#rides').DataTable({ "scrollX": true, "autoWidth": false, columnDefs: [ { targets: [0], render: $.fn.dataTable.render.moment( 'DD/MM/YYYY' ) } ], });
  
</script>

//targets: [0] is your colum  index for example

colum1 | Colum 2 | colum 3
it will choose colum1 as zero index
Posted by: Guest on August-06-2021

Code answers related to "jquery datatable date format dd/mm/yyyy"

Browse Popular Code Answers by Language