Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript][Angular2] Datepicker po PL, jak usawić datepicker wg LOCALE_ID?
poczatkujaca12
post
Post #1





Grupa: Zarejestrowani
Postów: 107
Pomógł: 0
Dołączył: 24.06.2010
Skąd: Warszawa

Ostrzeżenie: (0%)
-----


mam w kodzie (template, html):
  1. <input class="form-control" placeholder="yyyy-mm-dd" i18n-placeholder name="od" required id="od" [(ngModel)]="model" ngbDatepicker #d="ngbDatepicker" (click)="d.toggle()" />


w app.modules.ts:

  1. import { LOCALE_ID, NgModule } from '@angular/core';
  2.  
  3. import { registerLocaleData } from '@angular/common';
  4. import localePl from '@angular/common/locales/pl';
  5. import localePlExtra from '@angular/common/locales/extra/pl'
  6.  
  7. providers: [
  8. { provide: LOCALE_ID, useValue: 'pl' }


jak ustawić aby datepicker był po Polsku (lub w języku przeglądarki użytkownika)?

Ten post edytował poczatkujaca12 5.12.2017, 14:39:09
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 21:41