NativeScript / nativescript-datetimepicker

Plugin with date and time picking fields
Apache License 2.0
27 stars 26 forks source link

feat(angular): v10 support #70

Open NathanWalker opened 4 years ago

NathanWalker commented 4 years ago

Also scopes to @nativescript/datetimepicker

davr59 commented 4 years ago

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.

NathanWalker commented 4 years ago

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

nabilzhafri commented 4 years ago

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<…>
davr59 commented 4 years ago

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.

NathanWalker commented 4 years ago

@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.