Fix: Organizacion de Editar Ingreso igual a Nuevo Ingreso, corregido formato de fecha

This commit is contained in:
2026-04-14 00:04:40 -03:00
parent 88bfefc782
commit d43163590c
11 changed files with 708 additions and 30 deletions
+3 -5
View File
@@ -7,10 +7,8 @@ export function cn(...inputs: ClassValue[]) {
export function formatDateDDMMYYYY(dateString: string): string {
if (!dateString) return '';
const date = new Date(dateString);
if (isNaN(date.getTime())) return dateString;
const day = String(date.getDate()).padStart(2, '0');
const month = String(date.getMonth() + 1).padStart(2, '0');
const year = date.getFullYear();
const parts = dateString.split('-');
if (parts.length !== 3) return dateString;
const [year, month, day] = parts;
return `${day}-${month}-${year}`;
}