3

I'm on angular material 9.2.0. I installed @angular-material-components/datetime-picker for dateTimePicker .

I get this errors when I run ng build --prod.

enter image description here

James Z
  • 12,209
  • 10
  • 24
  • 44
  • Does it work if you change the import to `import {MatDatePickerModule} from '@angular/material/datepicker';` instead of importing DateRange? Typically you need to import the entire module, and this is the correct one inside the Material Docs – Jeremy Jul 09 '20 at 14:47
  • https://stackblitz.com/edit/demo-ngx-mat-datetime-picker?file=src%2Fapp%2Fapp.module.ts – Jeremy Jul 09 '20 at 14:53
  • Thank you @JeremyLucas for your response, no doesn't work – Asakkour Soufiane Jul 09 '20 at 14:57
  • Try manually deleting your `node_modules` folder, `package-lock.json` , and then restarting your code editor, typing `npm install` and trying again – Jeremy Jul 09 '20 at 15:00
  • 1
    @AsakkourSoufiane thanks, struggling with this for half an hour now :D – Szörényi Ádám Jul 10 '20 at 08:47

1 Answers1

17

I found a solution for that on github, The latest version 4.x.x supports Angular 10. For Angular 9, you should use the version 2.x by using this command:

npm i @angular-material-components/datetime-picker@2.0.4 --save