DanielYKPan / date-time-picker

Angular Date Time Picker (Responsive Design)
https://daniel-projects.firebaseapp.com/owlng/date-time-picker
MIT License
565 stars 356 forks source link

TypeError: this.picker is undefined using owl-date-time-inline #724

Closed RoWEN-FCUB closed 3 years ago

RoWEN-FCUB commented 3 years ago

I have this: component.html

<div>
      <owl-date-time-inline [(ngModel)]="selectedMoment"></owl-date-time-inline>
</div>

component.ts public selectedMoment = new Date();

I'm getting this error:

ERROR TypeError: this.container is undefined
    ngOnInit date-time-inline.component.js:246
    Angular 25
    __tryOrUnsub Subscriber.ts:265
    next Subscriber.ts:207
    _next Subscriber.ts:139
    next Subscriber.ts:99
    next Subject.ts:70

When I use owl-date-time it works fine. The problem is with owl-date-time-inline. I'm using "ng-pick-datetime": "^7.0.0",

RoWEN-FCUB commented 3 years ago

I did not see the warning that this library was no longer supported, I moved to danielmoncada / date-time-picker and now it works fine.