title: Angular material datepicker - blank popup in prod
body: <p>Not sure what I am missing. This works fine in when I run it in my local using ng build and ng serve</p>
  
  <p>But when I moved to production, it started behaving like this. Then I tried to reproduce in my local using <code>ng build --prod</code> and <code>ng serve --prod</code>. Now I can reproduce the issue in my local as well.</p>
  
  <p>What I want: the datepicker popup should appear with correct styling and should be able to select date</p>
  
  <p>What is working now: in local it is working with ng build and ng serve</p>
  
  <p>What is the issue: in prod (or using <code>ng build --prod</code> and <code>ng serve --prod</code>), the popup shows empty. please the below picture</p>
  
  <p>What I have tried: After researching I found some suggestions to try out with <code>ng serve --prod --build-optimizer=false</code> also tried by making <code>"buildOptimizer": false</code> in <code>angular.json</code></p>
  
  <p>Erro: When I click on the datepicker icon, I can below error</p>
  
  <pre><code>TypeError: Cannot read property 'getElementsByClassName' of
  </code></pre>
  
  <p>Please let me know what more information is required to debug this issue. I was thinking of creating a stackblitz, but it seems to be working in stackblitz.</p>
  
  <p>package.json:</p>
  
  <pre><code>  "dependencies": {
      "@angular/animations": "^7.0.3",
      "@angular/cdk": "^7.0.3",
      "@angular/common": "~7.0.0",
      "@angular/compiler": "~7.0.0",
      "@angular/core": "~7.0.0",
      "@angular/flex-layout": "^7.0.0-beta.19",
      "@angular/forms": "~7.0.0",
      "@angular/http": "~7.0.0",
      "@angular/material": "^7.0.3",
      "@angular/material-moment-adapter": "^7.3.4",
      "@angular/platform-browser": "~7.0.0",
      "@angular/platform-browser-dynamic": "~7.0.0",
      "@angular/router": "~7.0.0",
      "@swimlane/ngx-charts": "^10.1.0",
      "angular-google-charts": "^0.1.3",
      "bootstrap": "^4.1.3",
      "chart.js": "^2.8.0",
      "core-js": "^2.5.4",
      "dotenv": "^7.0.0",
      "hammerjs": "^2.0.8",
      "jquery": "^3.3.1",
      "moment": "^2.24.0",
      "ng-pick-datetime": "^5.2.6",
      "ng2-charts": "^2.0.3",
      "ng2-tooltip-directive": "^2.1.8",
      "ng4-charts": "^1.0.2",
      "ngx-cookie-service": "^2.1.0",
      "rxjs": "~6.3.3",
      "rxjs-compat": "^6.3.3",
      "zone.js": "~0.8.26"
    },
    "devDependencies": {
      "@angular-devkit/build-angular": "^0.11.4",
      "@angular/cli": "~7.0.2",
      "@angular/compiler-cli": "~7.0.0",
      "@angular/language-service": "~7.0.0",
      "@types/jasmine": "~2.8.8",
      "@types/jasminewd2": "~2.0.3",
      "@types/jquery": "^3.3.29",
      "@types/node": "~8.9.4",
      "codelyzer": "~4.5.0",
      "jasmine-core": "~2.99.1",
      "jasmine-spec-reporter": "~4.2.1",
      "karma": "~3.0.0",
      "karma-chrome-launcher": "~2.2.0",
      "karma-coverage-istanbul-reporter": "~2.0.1",
      "karma-jasmine": "~1.1.2",
      "karma-jasmine-html-reporter": "^0.2.2",
      "ngx-spec": "^2.0.0",
      "protractor": "~5.4.0",
      "ts-node": "~7.0.0",
      "tslint": "~5.11.0",
      "typescript": "~3.1.1"
    }
  </code></pre>
  
  <p>html:</p>
  
  <pre><code>        &lt;mat-form-field&gt;
                  &lt;mat-label&gt;From Date&lt;/mat-label&gt;
                  &lt;input  [value]="date.value" matInput [matDatepicker]="summBoardFromDatePicker"  placeholder="From Date" [(ngModel)]="summBoardFromDate"&gt;
                  &lt;mat-datepicker-toggle  matSuffix [for]="summBoardFromDatePicker"&gt;&lt;/mat-datepicker-toggle&gt;
                  &lt;mat-datepicker #summBoardFromDatePicker&gt;&lt;/mat-datepicker&gt;
          &lt;/mat-form-field&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/ADQKs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ADQKs.png" alt="enter image description here"></a></p>