javascript - Fullcalendar Week Title Format - Stack Overflow

Is it possible to get fullcalendar to show week titles as a single letter? So instead of the default:Mo

Is it possible to get fullcalendar to show week titles as a single letter? So instead of the default:

Mon Tue Wed Thu Fri Sat

how can I display:

S M T W T F S

I've tried:

$('#calendar').fullCalendar({
   header: {
   right: '',
   center: 'prev, title, next',
   left: ''
  },
  columnFormat: {
    month: 'd' //also tried 'D' but a number displayed instead
  }
)}

Is it possible to get fullcalendar to show week titles as a single letter? So instead of the default:

Mon Tue Wed Thu Fri Sat

how can I display:

S M T W T F S

I've tried:

$('#calendar').fullCalendar({
   header: {
   right: '',
   center: 'prev, title, next',
   left: ''
  },
  columnFormat: {
    month: 'd' //also tried 'D' but a number displayed instead
  }
)}
Share Improve this question asked Jun 25, 2015 at 14:40 user2209090user2209090 1541 silver badge10 bronze badges
Add a ment  | 

4 Answers 4

Reset to default 4

The shortest you can get is two letters

$('#calendar').fullCalendar({
   header: {
   right: '',
   center: 'prev, title, next',
   left: ''
  },
  columnFormat: {
    month: 'dd' //also tried 'D' but a number displayed instead
  }
});

This library uses moment library and all possible formats can be found here

From version 2.2.4,

You have to modify like this.

$('#calendar').fullCalendar({
    ...
    ...
    ...,
    views: {
        week: { // name of view
            columnFormat: 'dd'
        }
    }
});

If you are using dayGridMonth, inside the option apply ,

dayHeaderFormat: {
    weekday: 'narrow'
},

You can use slotLabelFormat:

slotLabelFormat: [
    { weekday: 'narrow' },
]

All possible formats are in documentation: https://fullcalendar.io/docs/v4/date-formatting

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744963492a4603530.html

相关推荐

  • javascript - Fullcalendar Week Title Format - Stack Overflow

    Is it possible to get fullcalendar to show week titles as a single letter? So instead of the default:Mo

    1天前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信