-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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 German Format #5041
Comments
See #4358 |
Also take a look at this plunker (with a dateadapter), it's working for brazilian portuguese: https://plnkr.co/edit/FlgGpjqyDlypas0VZJzo?p=preview |
Hello weisss123, add the following lines to your AppComponent to get German formatting.
Add a provider to your module:
and create a new file GermanDateAdapter:
Hope that helps Junus |
Thank you guys. This worked for me |
This is not documented very good in https://material.angular.io/components/datepicker/overview |
@JunusErgin See #6030 and #5722 |
@JunusErgin The parsing is incomplete. I.e. you can enter dates like 33.45.2017 and the control is not marked as invalid. I think the parsing should be much more complex to handle German (and in my case Croatian which is exactly the same as German) date parsing. |
You can use moment.js to validate the date |
@JunusErgin @zszep The DateAdapter class has the method |
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. |
Bug, feature request, or proposal:
Bug
What is the expected behavior?
If I choose a date in format dd.mm.yyyy (Datepicker Module) I expect that the popup will appear in month mm.
What is the current behavior?
Problem in Datepicker Module:
If dd<=12 then the popup appears in month dd instead of mm.
What are the steps to reproduce?
Just choose a date with dd<=12
I am even able to reproduce it on your site: https://material.angular.io/components/component/datepicker
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: