Open danwellman opened 3 years ago
Same here without moment.
I have same issue
It seems that it comes from :
DayjsDateAdapter extends DateAdapter
instead of
DayjsDateAdapter extends DateAdapter < DayJs >
It means that this package is not compatible with angular 10 import { DateAdapter, MAT_DATE_LOCALE } from '@angular/material'; instead of import { DateAdapter, MAT_DATE_LOCALE } from '@angular/material/core';
I'm using:
I'm working with an established and large application which is using an Angular Material datepicker with Moment.js (and momentjs date adapter). This is used in many, many places throughout the application, and Moment is also used independently for doing various date formatting/calculation outside of the date-picker. For consistency we have a simple date-component which wraps the material date-picker and sets some config, so that the picker can be used around the application with minimal effort.
So now I would like to use dayjs instead of momentjs with the material date-picker. I've created a new wrapper component for the date-picker and in the module I've imported the MatDayjsDateModule as shown here: https://www.npmjs.com/package/@tabuckner/material-dayjs-adapter
However, even before actually using my wrapper component anywhere in the application, I'm seeing an error in the console when serving the application:
Could this be due to the fact that I am still using Momentjs in the old wrapper component? Is it possible to use both Momentjs and Dayjs in the same application?
Obviously I can't include my full repo as it's a closed commercial application. The module for my wrapper component is as follows:
Any idea what could be causing the issue?