-
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
Add DateAdapter for date-fns #10278
Comments
@victornoel we've done by ourselves, you've got all that you need, Just implement and provide material's team should not waste time to implement adapters for each date library |
Isn't date-fns just operations on native |
@jleufven you are right, in the end that's what I do too, I use NativeDateAdapter + date-fns in the rest of my code. |
I think this may still be worth doing. There's some weird time zone corner cases that people sometimes run into with |
I have been looking into this today and created some test code, but would currently wait with a final implementation:
When doing the actual implementation, we need to figure out the best API for setting the locale, as there is no equivalent to So we might end up in a situation, where the consumer has to populate the loaded locales into a mapping structure which is provided to the DateFnsDateAdapter. Question regarding package-names: we currently have @angular/material-moment-adapter, should we just blindly add @angular/material-date-fns-adapter or should we consider merging into something like @angular/material-date-adapters/(material|date-fns|etc) |
I use this one: https://gist.github.com/JoniJnm/412325c073805437c68430b11407e11b |
is there chance this will be implemented? |
@JoniJnm I used the gist you gave and this was working fine but never setting the value at first. |
Tracking this in #20599 going forward |
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:
Feature Request
What is the use-case or motivation for changing an existing behavior?
It would be great to be able to use date-fns instead of javascript Date or moment.js with the date picker.
The feature was refused in the past because date-fns didn't support parsing but nowadays it does: https://date-fns.org/v1.29.0/docs/parse
The text was updated successfully, but these errors were encountered: