diff options
Diffstat (limited to 'lib/bidding/list/biddings-table-columns.tsx')
| -rw-r--r-- | lib/bidding/list/biddings-table-columns.tsx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/bidding/list/biddings-table-columns.tsx b/lib/bidding/list/biddings-table-columns.tsx index 36abd03c..907115b1 100644 --- a/lib/bidding/list/biddings-table-columns.tsx +++ b/lib/bidding/list/biddings-table-columns.tsx @@ -256,10 +256,15 @@ export function getBiddingsColumns({ setRowAction }: GetColumnsProps): ColumnDef if (!startDate || !endDate) return <span className="text-muted-foreground">-</span> - const now = new Date() - const isActive = now >= new Date(startDate) && now <= new Date(endDate) - const isPast = now > new Date(endDate) + const now = new Date().toString() + console.log(now, "now") + const startIso = new Date(startDate).toISOString() + const endIso = new Date(endDate).toISOString() + const isActive = new Date(now) >= new Date(startIso) && new Date(now) <= new Date(endIso) + console.log(isActive, "isActive") + const isPast = new Date(now) > new Date(endIso) + console.log(isPast, "isPast") return ( <div className="text-xs"> <div className={`${isActive ? 'text-green-600 font-medium' : isPast ? 'text-red-600' : 'text-gray-600'}`}> |
