Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Date filter breaks consistency with Angular #10640

Closed
@ilanbiala

Description

@ilanbiala

If I have something like this {{day | date:'mediumDate'}} where day could be an empty string '', angular is supposed to produce nothing for invalid values. However, I see undefined NaN, NaN, which goes against Angular's consistent "if the input is invalid, Angular won't throw errors, it will just output nothing." Is that not the case for the date filter?

How can I still get an empty string '' to be outputted? Do I have to add a conditional inside the expression?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions