aavanzyl / ngx-tiny

Implementation of Light Weight Angular Components for Production Applications
https://aavanzyl.github.io/ngx-tiny
MIT License
7 stars 3 forks source link

Using different locale doesn't change day translation #11

Closed JLNNN closed 4 years ago

JLNNN commented 4 years ago

Describe the bug If I use a different locale, I'm expecting the days of the week (Mo-Su) to be translated.

To Reproduce Steps to reproduce the behavior:

  1. installed npm packages as required
  2. setup everything as described in docs
  3. Use different locale (for example: de)
        datePickerOptions = {
            locale: deLocale
        }
  4. Click on datepicker input field
  5. See error

Expected behavior The overlay uses localized translations for the days. Example de (German): Mo = Mo Tu = Di We = Mi Th = Do Fr = Fr Sa = Sa Su = So

Versions (please complete the following information):

JLNNN commented 4 years ago

After trying and debugging different things, the following is working:

public datePickerOptions: DatePickerOptions = {
        locale: {locale: de},
        // ...
}