-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
fix(material-date-fns-adapter): locale not passed into parse function #23653
Conversation
Fixes that the locale wasn't being passed into the parsing function of `date-fns`. Fixes angular#23652.
@@ -54,7 +54,7 @@ const DAY_OF_WEEK_FORMATS = { | |||
export class DateFnsAdapter extends DateAdapter<Date, Locale> { | |||
constructor(@Optional() @Inject(MAT_DATE_LOCALE) matDateLocale: {}) { | |||
super(); | |||
super.setLocale(matDateLocale); | |||
this.setLocale(matDateLocale); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change isn't part of the fix, but I figured that it's less error-prone if we were to add a setLocale
override.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I could not merge this into patch due to merge conflicts with |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes that the locale wasn't being passed into the parsing function of
date-fns
.Fixes #23652.