Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datepicker: longDateFormat is in defaultFormat not in locale specific format #2611

Closed
SidekickJohn opened this issue Sep 11, 2017 · 0 comments

Comments

@SidekickJohn
Copy link

In format.ts when expandFormat is called, the specified _longDateFormat is not used properly to format the Date.

Using ngx-bootstrap 1.9.2.
Example:
I picked 'de' as locale which has: 'DD.MM.YYYY' as a _longDateFormat "L".

In File format.ts:
Looking into expandFormat() --> locale.longDateFormat(L) is set.
When format.replace(localFormattingTokens, replaceLongDateFormatTokens) is called, the locale specific part gets missing somehow.

In file locale.class.ts:
The locale specific formatting is lost and the default-format for L is used.

This results in a date that is formatted: 'MM/DD/YYY'.

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

No branches or pull requests

2 participants