Skip to content
This repository has been 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 opened this issue Mar 20, 2014 · 1 comment
Closed

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

ivosantiago opened this issue Mar 20, 2014 · 1 comment

Comments

@ivosantiago
Copy link

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

@bekos
Copy link
Contributor

bekos commented Mar 21, 2014

@ivosantiago Datepicker currently does not support string parsing to date. There is a PR in progress for this (#1874 ). Hopefully part of the next release. Duplicate of #1289.

@bekos bekos closed this as completed Mar 21, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants