logisticinfotech / ionic4-datepicker

Ionic 4 Datepicker component
https://www.logisticinfotech.com/blog/ionic4-datepicker-component/
Other
77 stars 33 forks source link

Can't bind to 'liIonic4Datepicker' since it isn't a known property of 'ion-input'. #22

Closed sohail0992 closed 5 years ago

sohail0992 commented 5 years ago

I am using ionic 4 and Ionic4DatepickerModule is imported in app module

<ion-input readonly [(ngModel)]="currentQuestion.datePicker" 
      [liIonic4Datepicker]="datePickerObj" 
      (ionchange)="myFunction()">
 </ion-input>
kirillusgadus commented 5 years ago

Did you add to page module?

    imports: [
        CommonModule,
        FormsModule,
        IonicModule,
        RouterModule.forChild(routes),
        ReactiveFormsModule,
       //this --> Ionic4DatepickerModule,
    ],
sohail0992 commented 5 years ago

Did you add to page module?

    imports: [
        CommonModule,
        FormsModule,
        IonicModule,
        RouterModule.forChild(routes),
        ReactiveFormsModule,
       //this --> Ionic4DatepickerModule,
    ],

Yes

chintan13 commented 5 years ago

Please check implementation in this repo and see what is the difference: https://github.com/logisticinfotech/ionic4-datepicker-example

My best guess is you need to add

Ionic4DatepickerModule,

In your page module file also.