3
votes

I'm trying to use Persian Jalali DatePicker for Angular Material in my project. So far, I have installed the package:

npm i --save @angular-persian/material-date-picker

But when I try to import it in my Angular project like so,

import {MatDatepickerModulePersian} from '@angular-persian/material-date-picker';

I get the following error:

Cannot find module '@angular-persian/material-date-picker' or its corresponding type declarations.

1
The pre-requisites are all installed,right? Have you ng served the app after installing it? - Wahab Shah
@WahabShah yes, I just ng served it but I'm still getting the cannot find module '@angular-persian/material-date-picker'. error. - Newsha Nik
The compiler can't resolve the module. Look at node_modules folder in order to check the module structure then employ adoptive strategy to help typescript find it based on your environment configuration. - Amirhossein Mehrvarzi
@NewshaNik Please explain how it solved. - Khalil Laleh
Actually @KhalilLaleh I was mistaken. It is not fixed. - Newsha Nik

1 Answers

3
votes

You just need to add "/src" to end of import

import {MatDatepickerModulePersian} from '@angular-persian/material-date-picker/src';