我有一个角V13.0.2应用程序,我正在扩展。我最近刚添加了Dexie (indexedDB)。现在,当我试图向数据库中添加一个日期时,我只会从其中得到一个“无效日期”语句。
// 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?发布于 2021-12-20 20:58:39
还不太清楚。但是Dexie.js使用了UNIX时代的时间格式。对于任何有相同问题的人,请使用:
new Date('1995-12-17T03:24:00')我希望某个地方的人能找到有用的东西。
https://stackoverflow.com/questions/70396974
复制相似问题