fix(open orders): made a change to correct the date being off by 1 day
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { ColumnDef } from "@tanstack/react-table";
|
import { ColumnDef } from "@tanstack/react-table";
|
||||||
import { format } from "date-fns";
|
//import { format } from "date-fns-tz";
|
||||||
|
|
||||||
// This type is used to define the shape of our data.
|
// This type is used to define the shape of our data.
|
||||||
// You can use a Zod schema here if you want.
|
// You can use a Zod schema here if you want.
|
||||||
@@ -44,12 +44,14 @@ export const openOrderColumns: ColumnDef<Adjustmnets>[] = [
|
|||||||
header: "DeliveryDate",
|
header: "DeliveryDate",
|
||||||
cell: ({ row }) => {
|
cell: ({ row }) => {
|
||||||
if (row.getValue("deliveryDate")) {
|
if (row.getValue("deliveryDate")) {
|
||||||
const correctDate = format(
|
// const correctDate = format(
|
||||||
row.getValue("deliveryDate"),
|
// row.getValue("deliveryDate"),
|
||||||
"M/d/yyyy hh:mm"
|
// "M/d/yyyy hh:mm"
|
||||||
);
|
// );
|
||||||
return (
|
return (
|
||||||
<div className="text-left font-medium">{correctDate}</div>
|
<div className="text-left font-medium">
|
||||||
|
{row.getValue("deliveryDate")}
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user