NativeScript / nativescript-datetimepicker

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

[nativescript-datetimepicker] iOS 14 display error #75

Closed bergerbyte closed 3 years ago

bergerbyte commented 3 years ago

With nativescript 6.8 and Angular the datetimepicker no longer works under iOS 14

Bildschirmfoto 2020-09-21 um 16 16 11
Cateye82 commented 3 years ago

I am facing the same issue, but saw the hint for the 2.0.0 Version:

NativeScript 7 Use @nativescript/datetimepicker: ~2.0.0 Source managed here: https://github.com/NativeScript/plugins

So I went there, downloaded the code, ran "npm run setup" and "npm start", selected the "datetimepicker" and it was generating some stuff into the "dist" folder.

Then I tried many things from copying it into the "nativescript-datetimepicker" folder and to "npm run publish-packages" but it seems that I am always ending up with the following error:

ERROR in ../node_modules/nativescript-datetimepicker/angular/fesm2015/nativescript-datetimepicker-angular.js Module not found: Error: Can't resolve '@nativescript/datetimepicker' in '/Users/cj/Documents/git/mtbappmobile/node_modules/nativescript-datetimepicker/angular/fesm2015' @ ../node_modules/nativescript-datetimepicker/angular/fesm2015/nativescript-datetimepicker-angular.js 3:0-102 209:41-56 210:41-56 211:46-66 @ ./app/shared/shared.module.ts @ ./app/app.module.ts @ ./main.ts Should it be placed somewhere into the "node_modules/@nativescript" folder?

The next thing I tried was: https://github.com/NativeScript/plugins/tree/master/packages/datetimepicker If you scroll down a little bit you will see the "ns plugin add @nativescript/datetimepicker" command which makes more sense. So I removed the old datetimepicker and used this command to install the new one. Also I changed the import statement. Then I am facing the following error:

Successfully transferred all files on device 02FF70FF-FFFC-4616-9FE3-4755FD304763. Restarting application on device 02FF70FF-FFFC-4616-9FE3-4755FD304763... CONSOLE LOG: Loading inspector modules... CONSOLE LOG: Finished loading inspector modules. ***** Fatal JavaScript exception - application has been terminated. ***** NativeScript encountered a fatal error: Uncaught TypeError: _nativescript_core__WEBPACK_IMPORTED_MODULE_0__.Property is not a constructor at ../node_modules/@nativescript/datetimepicker/ui/picker-field-base.js(file: node_modules/@nativescript/datetimepicker/ui/picker-field-base.js:35:0) at __webpack_require__(file: src/webpack/bootstrap:750:0) at fn(file: src/webpack/bootstrap:120:0) at ../node_modules/@nativescript/datetimepicker/ui/date-picker-field.common.js(file: node_modules/@nativescript/datetimepicker/ui/date-picker-field.common.js:1:0) at __webpack_require__(file: src/webpack/bootstrap:750:0) at fn(file: src/webpack/bootstrap:120:0) at ../node_modules/@nativescript/datetimepicker/ui/date-picker-field.js(file: node_modules/@nativescript/datetimepicker/ui/date-picker-field.ios.js:1:0) at __webpack_require__(file: src/webpack/bootstrap:750:0) at fn(file: src/webpack/bootstrap:120:0) at ../node_modules/@nativescript/datetimepicker/ui/index.js(file: node_modules/@nativescript/datetimepicker/ui/index.js:1:0) at __webpack_require__(file: src/webpack/bootstrap:750:0) at fn(file: src/webpack/bootstrap:120:0) at ../node_modules/@nativescript/datetimepicker/index.js(file:///app/vendor.js:1395<…> (CoreFoundation) *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Uncaught TypeError: _nativescript_core__WEBPACK_IMPORTED_MODULE_0__.Property is not a constructor at .... NativeScript debugger was not able to get inspector socket port on device 02FF70FF-FFFC-4616-9FE3-4755FD304763 for application

Then I tried moving the generated files inside the "dist" folder to the "@nativescript/datetimepicker/angular" folder. But this is ending up in the same error.

I have no ideas any more, can somebody please explain how to use it? Thank you.

alexander-mai commented 3 years ago

Duplicate of #69

NathanWalker commented 3 years ago

published in @nativescript/datetimepicker 2.0.3

mreall commented 3 years ago

That works. Thanks @alexander-mai and @NathanWalker!

dimitriospafos commented 3 years ago

Is there a fix for earlier version for people who don't use Nativescript 7?

NathanWalker commented 3 years ago

@dimitriospafos yes I can backport this - we've generally been backporting upon request. thanks for ping, i'll try to get this out tonight.

dimitriospafos commented 3 years ago

@NathanWalker thanks, I really appreciate it

Upd4ting commented 3 years ago

Is this somehow related? https://github.com/NativeScript/plugins/issues/128