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

Datepicker not working with i18n + longDate #4028

Closed
javorosas opened this issue Jul 28, 2015 · 4 comments
Closed

Datepicker not working with i18n + longDate #4028

javorosas opened this issue Jul 28, 2015 · 4 comments

Comments

@javorosas
Copy link

The date shows up well at the begining. Then, when selecting a date, the ng-model is set to undefined.

I'm having these issues with the datepicker under the following circumstances:

  • Angular 1.4.3
  • ui-bootstrap 0.13.1
  • angular i18n es-mx
  • When datepicker-popup="longDate"

I prepared this plunkr where it's reproduced
http://plnkr.co/edit/5M69XTp1dCuTS1MEH1r5?p=preview

Using ui-bootstrap 0.12.1 is working fine (except for the initialization format issue that was fixed on 0.13.0).

Thanks.

@wesleycho
Copy link
Contributor

Indeed, the datepicker does not currently support i18n fully - if you look in the dateparser component in the source code, you will see that there are manual regexs for parsing the date. long is not an option there.

I will gladly accept any PRs fixing this.

@javorosas
Copy link
Author

short and medium are neither an option and they both work

@wesleycho
Copy link
Contributor

Not all of the flags in long option work (as per Angular documentation) is the problem IIRC.

@wesleycho
Copy link
Contributor

Closing as a duplicate of #3418

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants