rd-dev-ukraine / angular-io-datepicker

MIT License
21 stars 18 forks source link

Add Locale in params #13

Open Acraciel opened 7 years ago

Acraciel commented 7 years ago

U can add Locale like a param to change the lenguaje display:

image

akempes commented 6 years ago

You can use your preferred language already by settings the locale in your controller using momentjs.

import * as moment from "moment";
import "moment/locale/de";

...

    public constructor() {
        moment.locale('de');
    }

The datepicker uses momentjs to format the date, so it should now be in the German locale. If the format is still not completely satisfying you can also use the format="" attribute.