title: Datepicker ngx-bootstrap
body: <p>I am trying to apply locale on old datepicker</p>
  
  <p><a href="https://valor-software.com/ngx-bootstrap/#/datepicker" rel="nofollow noreferrer">https://valor-software.com/ngx-bootstrap/#/datepicker</a></p>
  
  <p>I have tried evrything and i dont know where to look further, i can use the new one, but i have big solution that i have to stay on old datepicker</p>
  
  <p>Here is what i have</p>
  
  <p><strong>my.module.ts</strong></p>
  
  <pre><code>import { CommonModule } from '@angular/common';
  import { DatepickerModule } from 'ngx-bootstrap/datepicker';
  
  @NgModule({
      imports: [
          DatepickerModule.forRoot() 
      ],
      declarations: [
  
      ],
      providers: [
  
      ],
      schemas: [
          CUSTOM_ELEMENTS_SCHEMA
      ]
  })
  export class MyModule {
  }
  </code></pre>
  
  <p><strong>my.component.ts</strong></p>
  
  <pre><code>import { defineLocale } from 'ngx-bootstrap/bs-moment';
  import { de } from 'ngx-bootstrap/locale';
  defineLocale('de', de);
  
  
  @Component({
      templateUrl: './my.component.html',
      styleUrls: ['./my.component.scss']
  })
  
  export class MyComponent implements OnInit {}
  </code></pre>
  
  <p><strong>my.component.html</strong></p>
  
  <pre><code>  &lt;datepicker formControlName="effectiveDate" [showWeeks]="false" [locale]="de"&gt;
  </code></pre>
  
  <p>Can't bind to 'locale' since it isn't a known property of 'datepicker'. :(</p>