Angular, Dexie, invalid date

Discussão em 'Angular' iniciado por Ric Bocad, Março 31, 2025.

  1. Ric Bocad

    Ric Bocad Guest

    I have a Angular V13.0.2 app that I am expanding. I just recently added Dexie (indexedDB). Now when I try to add a date to my database I only get a "Invalid Date" statement out of it.

    // Export clients
    export interface Clients {
    id?: number;
    addressId: number;
    firstName: string;
    lastName: string;
    created: Date;
    }
    // Create a client
    const clientId = await db.clients.add({
    addressId: addressId,
    firstName: 'John',
    lastName: 'Doe',
    created: new Date('1995-12-17T03:24:00')
    });

    The visualization is nothing more then a ngFor over the clients. Am I missing something?

    Continue reading...

Compartilhe esta Página