title: Angular 9 - how to get extended (Locale aware start of week) NativeDateAdapter working?
body: <p>To get a Locale aware (in regards of start of the week) Material DatePicker i created this extension:</p>
  <pre><code>import { Injectable } from &quot;@angular/core&quot;;
  import { LOCALE_ID, Inject } from &quot;@angular/core&quot;;
  import { Platform } from &quot;@angular/cdk/platform&quot;;
  import { getLocaleFirstDayOfWeek } from &quot;@angular/common&quot;;
  import { NativeDateAdapter } from '@angular/material/core';
  
  @Injectable({providedIn: 'root'})
  export class LocaleDateAdapter extends NativeDateAdapter {
    constructor(@Inject(LOCALE_ID) public locale: string) {
      super(locale, new Platform());
    }
  
    getFirstDayOfWeek() {
      return getLocaleFirstDayOfWeek(this.locale);
    }
  }
  </code></pre>
  <p>I also tried with 0 args constructor and constantly retuning 1 as first day of week. Some colleague told that <code>{providedIn: 'root'}</code> might help - it did not.</p>
  <p>I hooked it in <code>app.module.ts</code> as provider:</p>
  <pre><code>{
    provide: DateAdapter,
    useClass: LocaleDateAdapter
  }
  </code></pre>
  <p>my DatePicker is set up like this:</p>
  <pre><code>&lt;mat-form-field appearance=&quot;fill&quot;&gt;
    &lt;mat-label&gt;set date&lt;/mat-label&gt;
    &lt;input matInput [matDatepicker]=&quot;picker1&quot; (dateChange)=&quot;onDateChange($event)&quot; [formControl]=formDate&gt;
    &lt;mat-datepicker-toggle matSuffix [for]=&quot;picker1&quot;&gt;&lt;/mat-datepicker-toggle&gt;
    &lt;mat-datepicker [startAt]=&quot;filter.date&quot;  #picker1&gt;&lt;/mat-datepicker&gt;
  &lt;/mat-form-field&gt;
  </code></pre>
  <p>The problem is that my LocaleDateAdapter is not instantiated (Breakpoint not hit) and the start of the week isn't changing - should  change to Monday.</p>
  <p>How to make it work?</p>