I am just starting out with Ionic and Angular, but I seem to have hit a roadblock. The compiler is throwing an error that says:
node_modules_ionic_core_dist_esm_ion-app_8_entry_js.js:2 TypeError: Cannot destructure property 'month' of '(0 , _data_cb72448c_js__WEBPACK_IMPORTED_MODULE_9__.P)(...)' as it is undefined.
at Datetime.processValue (ion-datetime_3.entry.js:702:15)
at Datetime.componentWillLoad (ion-datetime_3.entry.js:1082:10)
at safeCall (index-8e692445.js:1458:36)
at dispatchHooks (index-8e692445.js:1315:23)
at Array.dispatch (index-8e692445.js:1299:28)
at consume (index-8e692445.js:2242:21)
at flush (index-8e692445.js:2257:9) undefined
Within my HTML file, I have included an "ion-datetime" component.
<ion-item>
<ion-datetime [(ngModel)]="dateTime">
</ion-datetime>
</ion-item>
In my TypeScript file, I initialize dateTime as follows:
dateTime:Date=new Date();
I have also attempted to assign specific values to dateTime, but haven't had any success.
dateTime:Date=new Date('1990-12-20');
I am completely stumped by this issue and have been struggling for hours. Any assistance would be greatly appreciated. Thank you.