Fix date picker defaulting to UTC instead of browser local time
All checks were successful
Deploy to VPS / deploy (push) Successful in 17s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Carlos Escalante
2026-03-31 21:02:08 -06:00
parent b68129a171
commit e011a3adcc
3 changed files with 9 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
import { useEffect, useState } from 'react';
import api, { type Category, type Transaction } from '../api';
import { formatLocalDatetime } from '@/lib/format';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
@@ -33,7 +34,7 @@ export default function TransactionModal({ transaction, source, onClose, onSaved
merchant: '',
amount: '',
currency: 'CRC',
date: new Date().toISOString().slice(0, 16),
date: formatLocalDatetime(new Date()),
transaction_type: 'COMPRA',
source,
bank: 'BAC',