0

I would like to change the First week of the year. fullcalendar.io

Current View

enter image description here

Shift the Start of week down

https://i.stack.imgur.com/apq34.png

Mark
  • 6,762
  • 1
  • 33
  • 50

1 Answers1

0

I'm afraid there is no builtin functionality for this. You could use such trick:

$('#calendar').fullCalendar({
  header: {
    left: 'prev,next today',
    center: 'title',
    right: 'month,agendaWeek,agendaDay'
  },
  defaultView: 'month',
  weekNumbers: true,
  viewRender: function(view, element) {
      $('.fc-week-number').each(function(i, obj) {
      var weekNumber = $(obj).find('span:first').text();
      if ($.isNumeric(weekNumber)) {
        if (parseInt(weekNumber) == 1) {
          $(obj).find('span:first').text('');
        } else {
          $(obj).find('span:first').text(parseInt(weekNumber) - 1);
        }
      }

    });
  }
});

Here is the fiddle.

Enlico
  • 23,259
  • 6
  • 48
  • 102
Krzysztof Kaźmierczak
  • 1,401
  • 1
  • 11
  • 15
  • Actually, what i want do is, I want to keep a custom start week of the year. For example i want to start the week from March 3rd week or anywhere in the calendar. – Wohlig Technology Mar 15 '17 at 04:41