Search code examples
vue.jsnuxt.jsvcalendar

how to change v-calendar -not vuetify- days formats from (S,M,T,W) to be (Su,Mo,Tu,We)?


I'm using v-calendar at a Nuxtjs app, It displays/render the week days in this format (S,M,T,W,T,F,S) I want to change it to be (Su,Mo,Tu,We,Th,Fr,Sa).

I've read the docs and tried to use:formats="DD:MM:YYYY" prop for the component but it didn't work.


Solution

  • Probably the best approach here is to use the following

    :locale="{ id: 'en', firstDayOfWeek: 2, masks: { weekdays: 'WWW' } }"
    

    It may fix several things down the road too (like index, formatting, dates/times etc).