nativescript-datetimepicker icon indicating copy to clipboard operation
nativescript-datetimepicker copied to clipboard

feat(angular): v10 support

Open NathanWalker opened this issue 5 years ago • 5 comments

Also scopes to @nativescript/datetimepicker

NathanWalker avatar Jul 18 '20 06:07 NathanWalker

Hello @NathanWalker. I am learning NativeScript and try to migrate an app to angular 10 and noticed that datetimepicker does not work yet with angular 10. Then I found this open PR. Are you planning to merge it to master? NativeScript is awesome, thank you for all your hard work.

davr59 avatar Aug 05 '20 02:08 davr59

Hi @davr59 thanks! It’s actually published under scope for you to use now. Give “rc” a try as we’re using it with some angular 10 projects already (note the newly scoped name): https://www.npmjs.com/package/@nativescript/datetimepicker

NathanWalker avatar Aug 05 '20 05:08 NathanWalker

Hi @NathanWalker, I just upgraded my project to angular 10, and I used the new "rc" a try, however it produced this error. How did you get around this error?

CONSOLE ERROR file: src/app/errors-handler.ts:12:18: Error: Uncaught (in promise):
TypeError: Cannot call a class constructor without |new| TextField
at PickerFieldBase(file: node_modules/@nativescript/datetimepicker/ui/picker-field-base.js:8:0)
at DatePickerFieldBase(file: node_modules/@nativescript/datetimepicker/ui/date-picker-field.common.js:12:0)
at DatePickerField(file: node_modules/@nativescript/datetimepicker/ui/date-picker-field.ios.js:8:0)
at createView(file: node_modules/@nativescript/angular/__ivy_ngcc__/fesm2015/nativescript-angular.js:2543:0)
at createElement(file: node_modules/@nativescript/angular/__ivy_ngcc__/fesm2015/nativescript-angular.js:2962:0)
at ɵɵelementStart(file: node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:13975:0)
at ɵɵelement(file: node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:14052:0)
at RegisterComponent_Template(file: src/app/auth/register/register.component.html:30:10)
at executeTemplate(file: node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:7447:0)
at renderView(file: node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:7256:0)
at renderComponent(file: node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:8501:0)
at renderChildComponents(file: node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:7115:0)
at renderView(file: node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:7281:0)
at create(file: node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:22290:0)
at createComponent(file: node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js:10246:0)
at activateOnGoForward(file: node_modules/@nativescript/angular/__ivy_ngcc__/fesm2015/nativescript-angular.js:4556:0)
at activateWith(file: node_modules/@nativescript/angular/__ivy_ngcc__/fesm2015/nativescript-angular.js:4529:0)
at activateRoutes<…>

nabilzhafri avatar Aug 05 '20 10:08 nabilzhafri

Hi @davr59 thanks! It’s actually published under scope for you to use now. Give “rc” a try as we’re using it with some angular 10 projects already (note the newly scoped name): https://www.npmjs.com/package/@nativescript/datetimepicker

Thanks @NathanWalker !! I will give it a try.

davr59 avatar Aug 06 '20 01:08 davr59

@nabilzhafri @davr59 we just published some fixes here for angular 10 - if you can try rebuilding with latest 2.0.1 version - if set to "@nativescript/datetimepicker": ~2.0.0 then should get it.

NathanWalker avatar Aug 25 '20 01:08 NathanWalker