The problem is that I can't use <mat-date-range-input>
Material Component because I get an error:
I have a module called "Material module" and there's an import and export of MatNativeDateModule
and MatDatepickerModule
. This module is imported into module I'm working with.
I can use simple mat-datepicker
and it works properly.
Can anybody help me with that?
10.1.2 - version of Material
Are you on an older version of Angular, but on version 10.1.2 of material?
mat-date-range-input
doesn't work on Angular versions lower than 10.0.2. To take advantage of this, you have to update your application, this is pretty straightforward if you are on version 9. I faced the same issue and after updating the range date picker is working.
For detailed information of how to update go to: https://update.angular.io/.
These imports also have to be in the app.module.ts
import {MatDatepickerModule} from '@angular/material/datepicker';
import {MatNativeDateModule} from '@angular/material/core';
Hope this helps. :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With