Description
Documentation Feedback
When using MatMomentDateModule, it's not obvious how to get it working from the docs. Even googling gets you to slightly droll posts like #12887
Affected documentation page:
If you go here:
https://material.angular.io/components/datepicker/overview#choosing-a-date-implementation-and-date-format-settings
It says to install moment.
If you go to Moment, it says to do:
npm i moment
You still get an error from import { MatMomentDateModule }
You must also do:
npm i @angular/material-moment-adapter
While Angular could probably say "that's Moment's issue" and Moment could say "No, that's Material's issue" I think it would be best to mention on the doc page here:
To say:
To install
npm i moment
npm i @angular/material-moment-adapter
In your module:
import { MatMomentDateModule, MomentDateAdapter } from "@angular/material-moment-adapter";
While #12887 is certainly dead accurate, it shouldn't be necessary to google all over the place due to documentation terseness.
My guess: Most large development projects already have a package.json and an app.module.ts that's just loaded with all kinds of junk, so "it' just works". I was doing a coding challenge and going step by step and ran into this.
There are three other similar bugs, all of them locked, and none with a resolution.
(I do find in general, while the documentation is very beautiful, the "TS" tabs frequently don't show the proper module imports).
Seriously - big thumbs up to the look and feel of the docs, and the amazing completeness in most areas. Let's get it the rest of the way!