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

Inline Date Time Not Loading Angular 9 #695

Open jgreen-linx opened 4 years ago

jgreen-linx commented 4 years ago

I'm having an issue with a simple picker HTML: <owl-date-time-inline [(ngModel)]="selectedMoment">

This is failing with: Uncaught TypeError: Cannot set property 'picker' of undefined at OwlDateTimeInlineComponent.push../node_modules/ng-pick-datetime/__ivy_ngcc__/date-time/date-time-inline.component.js.OwlDateTimeInlineComponent.ngOnInit (date-time-inline.component.js:248) at callHook (core.js:4686) at callHooks (core.js:4650) at executeInitAndCheckHooks (core.js:4591) at refreshView (core.js:11814) at refreshComponent (core.js:13229) at refreshChildComponents (core.js:11527) at refreshView (core.js:11848) at refreshDynamicEmbeddedViews (core.js:13154) at refreshView (core.js:11819)

On page load.

"target": "es2015",

"ng-pick-datetime": "^7.0.0", "@angular/animations": "^9.1.0", "@angular/cdk": "^8.2.2", "@angular/common": "~9.1.0", "@angular/compiler": "~9.1.0", "@angular/core": "~9.1.0", "@angular/forms": "~9.1.0", "@angular/localize": "^9.1.0", "@angular/material": "^8.2.2", "@angular/platform-browser": "~9.1.0", "@angular/platform-browser-dynamic": "~9.1.0", "@angular/router": "~9.1.0",

Unsure if related but the dialog mode is also not working. HTML: <input [owlDateTimeTrigger]="dt5" [owlDateTime]="dt5"> <owl-date-time [pickerMode]="'dialog'" #dt5>

zone-evergreen.js:171 Uncaught TypeError: Class constructor BasePortalOutlet cannot be invoked without 'new' at new OwlDialogContainerComponent (dialog-container.component.js:45) at NodeInjectorFactory.OwlDialogContainerComponent_Factory [as factory] (dialog-container.component.js:255) at getNodeInjectable (core.js:5950) at instantiateRootComponent (core.js:12585) at createRootComponent (core.js:26364) at ComponentFactory$1.create (core.js:33895) at ViewContainerRef.createComponent (core.js:15390) at DomPortalOutlet.attachComponentPortal (portal.js:318) at DomPortalOutlet.attach (portal.js:221) at OverlayRef.attach (overlay.js:948)

rohitgituser commented 4 years ago

I am Facing the issue Tried to use older versions (6.016, 6.0.5, 7.0.0) But still the same Error 2 : - ERROR TypeError: Cannot read property 'activeSelectedIndex' of undefined at OwlDateTimeInlineComponent.push../node_modules/ng-pick-datetime/date-time/date-time-inline.component.js.OwlDateTimeInlineComponent.writeValue

Have you found any solution @jgreen-linx Please help

prashantasdeveloper commented 4 years ago

Facing similar issue with dialog mode with angular version 9

VM241 vendor.js:22420 ERROR TypeError: Cannot read property 'hasAttached' of undefined at OwlDialogContainerComponent.push../node_modules/ng-pick-datetime/ivy_ngcc__/dialog/dialog-container.component.js.OwlDialogContainerComponent.attachComponentPortal (VM261 default~acronym-acronym-module~lms-lms-module~wish-wish-module.js:48797) at OwlDialogService.push../node_modules/ng-pick-datetime/ivy_ngcc/dialog/dialog.service.js.OwlDialogService.attachDialogContent (VM261 default~acronym-acronym-module~lms-lms-module~wish-wish-module.js:49356) at OwlDialogService.push../node_modules/ng-pick-datetime/__ivy_ngcc/dialog/dialog.service.js.OwlDialogService.open (VM261 default~acronym-acronym-module~lms-lms-module~wish-wish-module.js:49325) at OwlDateTimeComponent.push../node_modules/ng-pick-datetime/ivy_ngcc__/date-time/date-time-picker.component.js.OwlDateTimeComponent.openAsDialog (VM261 default~acronym-acronym-module~lms-lms-module~wish-wish-module.js:47321) at OwlDateTimeComponent.push../node_modules/ng-pick-datetime/ivy_ngcc/date-time/date-time-picker.component.js.OwlDateTimeComponent.open (VM261 default~acronym-acronym-module~lms-lms-module~wish-wish-module.js:47231) at OwlDateTimeTriggerDirective.push../node_modules/ng-pick-datetime/__ivy_ngcc/date-time/date-time-picker-trigger.directive.js.OwlDateTimeTriggerDirective.handleClickOnHost (VM261 default~acronym-acronym-module~lms-lms-module~wish-wish-module.js:46824) at OwlDateTimeTriggerDirective_click_HostBindingHandler (VM261 default~acronym-acronym-module~lms-lms-module~wish-wish-module.js:46864) at executeListenerWithErrorHandling (VM241 vendor.js:33463) at wrapListenerIn_markDirtyAndPreventDefault (VM241 vendor.js:33498) at HTMLInputElement. (VM241 vendor.js:54774)

Have you found any solution @jgreen-linx @rohitgituser Please help

jgreen-linx commented 4 years ago

No, I have not found a solution yet,

jerryodhiambo commented 4 years ago

Anyone with a solution yet?

NaamaBarAkiva commented 4 years ago

I used this instead: https://github.com/danielmoncada/date-time-picker

f3l1xss commented 4 years ago

Lol the usual case of library maintainer suddenly abandoning the project