ERROR TypeError: You provided 'undefined' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
See original GitHub issueI tried with below code, pass compiling, but when going into the page with the date picker, it throws error like below. Also the spinner in date picker doesn’t work.
<mat-form-field>
<input matInput [ngxMatDatetimePicker]="picker">
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker></ngx-mat-datetime-picker>
</mat-form-field>
Below is the error stack.
core.js:4196 ERROR TypeError: You provided ‘undefined’ where a stream was expected. You can provide an Observable, Promise, Array, or Iterable. at subscribeTo (subscribeTo.js:27) at subscribeToResult (subscribeToResult.js:11) at MergeMapSubscriber._innerSub (mergeMap.js:59) at MergeMapSubscriber._tryNext (mergeMap.js:53) at MergeMapSubscriber._next (mergeMap.js:36) at MergeMapSubscriber.next (Subscriber.js:49) at Observable._subscribe (subscribeToArray.js:3) at Observable._trySubscribe (Observable.js:42) at Observable.subscribe (Observable.js:28) at MergeMapOperator.call (mergeMap.js:21)
I tried to reproduce this bug on Stackblitz (https://stackblitz.com/edit/angular-ivy-hfg2a4), but it throws error: Error in ~/src/main.ts ngcc failed to run on @angular-material-components/moment-adapter@4.0.1, @angular-material-components/datetime-picker@4.0.1.
version: Angular 10 “@angular-material-components/datetime-picker”: “^4.0.1”, “@angular-material-components/moment-adapter”: “^4.0.1”,
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:9 (2 by maintainers)
Top Related StackOverflow Question
@tenglongroy @achablowski I could reproduce this bug. I am trying to fix it soon.
@nikolaifedorov Thank you very much. The codes that you found help me a lot. @tenglongroy @fjc2112 @achablowski @bluee Sorry for late reply. A new version @angular-material-components/datetime-picker v4.0.2 has already been released to resolve this bug. Thanks all for your support.