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.

bug(datepicker): doesn't apply the format when you type #1965

Closed
@ivosantiago

Description

@ivosantiago

Hey guys,

the code I'm using to reproduce this bug is the example one (http://angular-ui.github.io/bootstrap/#/datepicker).

  1. I did open it at Plunker and added this date format: 'dd-MM-yyyy'.
$scope.formats = ['dd-MM-yyyy', 'dd-MMMM-yyyy', 'yyyy/MM/dd', 'shortDate'];
  1. When I clicked at the input, the calendar poped and everything worked fine when I picked the date clicking.
  2. When I clicked at the input and edit the value typing it doesn't apply the format I chose previously and gave me the wrong date.

For example:

  • Apply the format 'dd-MM-yyyy'.
  • Select (clicking at the calendar widget) 21/03/2014. It will work fine.
  • Click at the input again and now type 12/03/2014.

Instead of apply the format and return the 12nd Mar 2014 it returns 3rd Dec 2014.

Does somebody have any thoughts?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions