fix: corrige timezone e seleção de parcelas na análise de parcelas
- Ajusta timezone em datas de vencimento para evitar dia anterior - Corrige bug ao selecionar parcelas individuais (React state) - Melhora UI: exibe Total/Pendente sempre, Selecionado inline
This commit is contained in:
@@ -19,7 +19,8 @@ function calculateDueDate(period: string, dueDay: string | null): Date | null {
|
||||
const day = parseInt(dueDay, 10);
|
||||
if (isNaN(day)) return null;
|
||||
|
||||
return new Date(parseInt(year), parseInt(month) - 1, day);
|
||||
// Criar data ao meio-dia para evitar problemas de timezone
|
||||
return new Date(parseInt(year), parseInt(month) - 1, day, 12, 0, 0);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user