-1

I'm using this date picker https://www.npmjs.com/package/angular2-datetimepicker, and I would like to know if there is any way in which I can change the naming of the weekdays "Mon/Tue/Wed/..." or the naming of months?

There's a StackBlitz example here: https://stackblitz.com/edit/angular-mmq3ng?file=src%2Fapp%2Fhello.component.ts

DLO
  • 914
  • 1
  • 13
  • 30

1 Answers1

1

Seems like there is no build-in option to change the format in the date-picker itself. You can change how the selected date is displayed.

In the app.component.ts in your StackBlitz example, just change the format of the settings object.

settings = {
    bigBanner: true,
    timePicker: false,
    format: 'EEEE MMM yyy',  <-- Change this format
    defaultOpen: true
}

In the example above I changed it to a format like this: Tuesday Feb 2020

On the npm page you can find all the information on what formats are accepted (there are a lot of them).

Wolfyr
  • 409
  • 3
  • 11