date-time-picker icon indicating copy to clipboard operation
date-time-picker copied to clipboard

Open a Picker as a Dialog not working

Open rmn-kmr opened this issue 5 years ago • 8 comments

ERROR - OwlDialogContainerComponent_Host.ngfactory.js? [sm]:1 ERROR TypeError: Class constructor BasePortalOutlet cannot be invoked without 'new' at new OwlDialogContainerComponent (dialog-container.component.js:40) at createClass (core.js:27864) at createDirectiveInstance (core.js:27673) at createViewNodes (core.js:38309) at createRootView (core.js:38181) at callWithDebugContext (core.js:39710) at Object.debugCreateRootView [as createRootView] (core.js:38947) at ComponentFactory_.create (core.js:26815) at ComponentFactoryBoundToModule.create (core.js:22779) at ViewContainerRef_.createComponent (core.js:26971)

Now how I fixed this - In dialoge-container.js

For OwlDialogContainerComponent function -

I made one change in OwlDialogContainerComponent function

function OwlDialogContainerComponent(changeDetector, elementRef, focusTrapFactory, document) {
    var _this =  **this || _super.call(this);**
    _this.changeDetector = changeDetector;
    _this.elementRef = elementRef;
    _this.focusTrapFactory = focusTrapFactory;
    _this.document = document;
    _this.ariaLabelledBy = null;
    _this.animationStateChanged = new EventEmitter();
    _this.isAnimating = false;
    _this.state = 'enter';
    _this.params = {
        x: '0px',
        y: '0px',
        ox: '50%',
        oy: '50%',
        scale: 0
    };
    _this.elementFocusedBeforeDialogWasOpened = null;
    return _this;
}

Now can anyone give me a solution to fix this permanently because I am not able to use this in production?

Thank you

rmn-kmr avatar Aug 25 '19 04:08 rmn-kmr

Done some research - https://github.com/bugsnag/bugsnag-js/issues/505

rmn-kmr avatar Aug 25 '19 05:08 rmn-kmr

@rmn-kmr did you resolved this. I am facing the same issue.

maharjanraj avatar Sep 21 '19 03:09 maharjanraj

Class constructor BasePortalOutlet cannot be invoked without 'new' at new OwlDialogContainerComponen

facing this issue while using [pickerMode]="'dialog'" in owl-date-time tag

kindly resolve this if any one get the solution please post it here

ank-y avatar Nov 12 '19 07:11 ank-y

change the "target" to "es5" in your project's tsconfig.json file. Fixed the issue for me Its broken when "target" is set to "es2015" which is the Angular 8 default.

ruhaim avatar Nov 15 '19 11:11 ruhaim

change the "target" to "es5" in your project's tsconfig.json file. Fixed the issue for me Its broken when "target" is set to "es2015" which is the Angular 8 default.

This worked for me.

Thank you!

VladWhappy avatar Nov 15 '19 11:11 VladWhappy

can this be fixed to work with es2015 as the target? es5 didn't fix for me

jgreen-linx avatar May 11 '20 08:05 jgreen-linx

change the "target" to "es5" in your project's tsconfig.json file. Fixed the issue for me Its broken when "target" is set to "es2015" which is the Angular 8 default.

thank you, this workes for me

ank-y avatar May 28 '20 12:05 ank-y

change the "target" to "es5" in your project's tsconfig.json file. Fixed the issue for me Its broken when "target" is set to "es2015" which is the Angular 8 default.

This worked for me "@angular/cli": "~8.3.13",

Sourav4479 avatar Aug 10 '20 07:08 Sourav4479