Angular Datepicker formats two digit dates into literal year

Discussão em 'Angular' iniciado por Test Toon, Dezembro 17, 2024.

  1. Test Toon

    Test Toon Guest

    For example, if I type the date 17/11/24, the date will become 17/11/0024

    Why is this happening? I've noticed that if I import MatNativeDateModule, this doesn't happen, but then the date is in an american format.

    My code is the following:

    I've tried my best to recreate the issue on stackblitz

    https://angular-2qxvhtpt.stackblitz.io

    Obviously there's something going on with the datepicker when the user types a date in that's resulting in two digit years being off by 2000 years.

    Does anyone know what might be causing this?

    Continue reading...

Compartilhe esta Página