This commit is contained in:
jokoprasetio 2025-04-27 23:46:03 +07:00
parent f3cc7c6d9e
commit 8e31b04595

View File

@ -90,5 +90,24 @@ dataTable.bootstrapTable({
sortable: true,
},
{
title: "Waktu Tindakan",
field: "created_at",
sortable: true,
formatter: function(value, row, index) {
console.log(row);
if (!value) return '-';
const date = new Date(value);
const options = { year: 'numeric', month: 'short', day: 'numeric' };
const formattedDate = date.toLocaleDateString('id-ID', options);
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
return `${formattedDate} ${hours}:${minutes}`;
}
},
],
});