atais / ng2-eonasdan-datetimepicker

A wrapper directive around the Eonasdan Datepicker v4 component.
MIT License
34 stars 23 forks source link

Error in Angular 5 #24

Closed svetivanova closed 6 years ago

svetivanova commented 6 years ago

It doesn't work with angular5. I've got error: ERROR TypeError: this.dpElement.datetimepicker is not a function

Stack trace:
DateTimePickerDirective.prototype.ngOnInit@webpack-internal:///../../../../ng2-eonasdan-datetimepicker/dist/datetimepicker.directive.js:24:9
checkAndUpdateDirectiveInline@webpack-internal:///../../../core/esm5/core.js:12598:9
checkAndUpdateNodeInline@webpack-internal:///../../../core/esm5/core.js:14125:20
checkAndUpdateNode@webpack-internal:///../../../core/esm5/core.js:14068:16
debugCheckAndUpdateNode@webpack-internal:///../../../core/esm5/core.js:14961:55
debugCheckDirectivesFn@webpack-internal:///../../../core/esm5/core.js:14902:13
View_PatientInformationFormComponent_0/<@ng:///AppModule/PatientInformationFormComponent.ngfactory.js:394:5
debugUpdateDirectives@webpack-internal:///../../../core/esm5/core.js:14887:12
checkAndUpdateView@webpack-internal:///../../../core/esm5/core.js:14034:5
callViewAction@webpack-internal:///../../../core/esm5/core.js:14385:21
execComponentViewsAction@webpack-internal:///../../../core/esm5/core.js:14317:13
checkAndUpdateView@webpack-internal:///../../../core/esm5/core.js:14040:5
callViewAction@webpack-internal:///../../../core/esm5/core.js:14385:21
execComponentViewsAction@webpack-internal:///../../../core/esm5/core.js:14317:13
checkAndUpdateView@webpack-internal:///../../../core/esm5/core.js:14040:5
callViewAction@webpack-internal:///../../../core/esm5/core.js:14385:21
execEmbeddedViewsAction@webpack-internal:///../../../core/esm5/core.js:14343:17
checkAndUpdateView@webpack-internal:///../../../core/esm5/core.js:14035:5
callViewAction@webpack-internal:///../../../core/esm5/core.js:14385:21
execComponentViewsAction@webpack-internal:///../../../core/esm5/core.js:14317:13
checkAndUpdateView@webpack-internal:///../../../core/esm5/core.js:14040:5
callWithDebugContext@webpack-internal:///../../../core/esm5/core.js:15288:39
debugCheckAndUpdateView@webpack-internal:///../../../core/esm5/core.js:14825:12
ViewRef_.prototype.detectChanges@webpack-internal:///../../../core/esm5/core.js:11802:9
ApplicationRef.prototype.tick/<@webpack-internal:///../../../core/esm5/core.js:6110:58
ApplicationRef.prototype.tick@webpack-internal:///../../../core/esm5/core.js:6110:13
ApplicationRef/<.next/<@webpack-internal:///../../../core/esm5/core.js:5943:99
ZoneDelegate.prototype.invoke@webpack-internal:///../../../../zone.js/dist/zone.js:391:17
forkInnerZoneWithAngularBehavior/zone._inner<.onInvoke@webpack-internal:///../../../core/esm5/core.js:4953:24
ZoneDelegate.prototype.invoke@webpack-internal:///../../../../zone.js/dist/zone.js:390:17
Zone.prototype.run@webpack-internal:///../../../../zone.js/dist/zone.js:141:24
NgZone.prototype.run@webpack-internal:///../../../core/esm5/core.js:4770:54
ApplicationRef/<.next@webpack-internal:///../../../core/esm5/core.js:5943:69
EventEmitter.prototype.subscribe/schedulerFn<@webpack-internal:///../../../core/esm5/core.js:4539:36
SafeSubscriber.prototype.__tryOrUnsub@webpack-internal:///../../../../rxjs/_esm5/Subscriber.js:244:13
SafeSubscriber.prototype.next@webpack-internal:///../../../../rxjs/_esm5/Subscriber.js:191:17
Subscriber.prototype._next@webpack-internal:///../../../../rxjs/_esm5/Subscriber.js:132:9
Subscriber.prototype.next@webpack-internal:///../../../../rxjs/_esm5/Subscriber.js:96:13
Subject.prototype.next@webpack-internal:///../../../../rxjs/_esm5/Subject.js:65:17
EventEmitter.prototype.emit@webpack-internal:///../../../core/esm5/core.js:4519:24
checkStable@webpack-internal:///../../../core/esm5/core.js:4918:13
forkInnerZoneWithAngularBehavior/zone._inner<.onHasTask@webpack-internal:///../../../core/esm5/core.js:4966:21
ZoneDelegate.prototype.hasTask@webpack-internal:///../../../../zone.js/dist/zone.js:444:21
ZoneDelegate.prototype._updateTaskCount@webpack-internal:///../../../../zone.js/dist/zone.js:464:17
Zone.prototype._updateTaskCount@webpack-internal:///../../../../zone.js/dist/zone.js:288:17
Zone.prototype.runTask@webpack-internal:///../../../../zone.js/dist/zone.js:208:25
drainMicroTaskQueue@webpack-internal:///../../../../zone.js/dist/zone.js:595:25
atais commented 6 years ago

I think that unless someone (or me) fixes all the bugs previously found and describe the lib installation properly this might be more and more difficult to use with every next angular version.

djoufouf commented 6 years ago

same probleme , how we handle it this problem ?