admin管理员组文章数量:1127591
I try to use the materials date picker but have problem using it with another language. Every solution I find says I have to install "material-moment-adapter" and than I have to use the MomentDateAdapter. But although I have managed to install it (had some version problems using Angular 18.2 and it seems to have a newer version) my system does not find the MomentDateAdapter.
What can I do?
Best regards
Parascus
EDIT!!!:
Generally I tried to implement the solution of "; regarding the usage of a MomentUtcDateAdapter. I (again?) installed it with the following commands:
npm i @angular/material-moment-adapter
and
npm i angular-moment
both ended with no further warnings or errors.
Afterwards I implemented the suggested Service of the other post/answer and the strange thing is that although I restarted my Visual Studio it still didn't suggest the corresponding imports and classes in auto complete. That's the reason I assumed that it was not working.
Than I tried to copy the import statements from the post/answer and inserted it (bypassing auto complete) and the source was accepted without any further errors.
I still do not know why Visual Studio didn't suggested the classes as it suggested other completions. But the show must go on and I'll keep in mind that sometimes one has to write the code without auto completion.
I try to use the materials date picker but have problem using it with another language. Every solution I find says I have to install "material-moment-adapter" and than I have to use the MomentDateAdapter. But although I have managed to install it (had some version problems using Angular 18.2 and it seems to have a newer version) my system does not find the MomentDateAdapter.
What can I do?
Best regards
Parascus
EDIT!!!:
Generally I tried to implement the solution of "https://stackoverflow.com/questions/48710053/day-incorrect-in-angular-material-datepicker?rq=2" regarding the usage of a MomentUtcDateAdapter. I (again?) installed it with the following commands:
npm i @angular/material-moment-adapter
and
npm i angular-moment
both ended with no further warnings or errors.
Afterwards I implemented the suggested Service of the other post/answer and the strange thing is that although I restarted my Visual Studio it still didn't suggest the corresponding imports and classes in auto complete. That's the reason I assumed that it was not working.
Than I tried to copy the import statements from the post/answer and inserted it (bypassing auto complete) and the source was accepted without any further errors.
I still do not know why Visual Studio didn't suggested the classes as it suggested other completions. But the show must go on and I'll keep in mind that sometimes one has to write the code without auto completion.
Share Improve this question edited 2 days ago parascus asked Jan 8 at 18:03 parascusparascus 1,2291 gold badge11 silver badges15 bronze badges 2- Please share the commands that you are running, the code that you are adding and the exact error messages you are facing – JSON Derulo Commented Jan 9 at 10:11
- Hi JSON Derulo. Thanks for your request for more information (that is indeed necessary). Trying to get the errors once again I followed some steps, of which I think they were the same steps I have done. Because of comment limitation I make an edit in my request. – parascus Commented 2 days ago
1 Answer
Reset to default 0Closed because the problem was not the code but a wrong display/auto complete list in the IDE.
本文标签: Error installing angularmaterialmomentadapterStack Overflow
版权声明:本文标题:Error installing @angularmaterial-moment-adapter - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736696541a1948207.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论