Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was archived by the owner on May 29, 2019. It is now read-only.

non-dates are being parsed as valid dates #3104

@bolemeus

Description

@bolemeus

I have a datepicker on my site, using the following format 'dd-MM-yyyy'.
Because it is possible to manually insert a date I want the datepicker to do some validation on it.

However, when I enter the first digit of the date, for example a 1, the datepicker already assumes it's a valid date. It parses it into the date 1 January 2001. The date picker also fills the model with this incorrect date.

Because I use that date in a function that is called with a ng-change function this causes unwanted behaviour.

Is there something I'm missing, or is this a bug?

PS: this bug also happens in the demo.
http://angular-ui.github.io/bootstrap/#/datepicker#datepicker

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions