Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fullCalendar: Extra week displayed after September

Tags:

fullcalendar

I see that using v2.1.1 there is an extra week displayed after September - so the first 10 days of October are displayed there.

Examples:

  • can be seen right now on the home page of http://arshaw.com/fullcalendar/
  • And also at: http://jsfiddle.net/dLsnqomc/
  • And screen cap below...

Code:

<div id="calendar"></div>

$('#calendar').fullCalendar();

Any idea how to remove the superfluous last week (October 5-11)?

Thanks Sample of extra week

like image 532
kneidels Avatar asked Sep 02 '14 14:09

kneidels


People also ask

What is a full calendar week?

Definition of calendar week : a week beginning with Sunday and ending with Saturday.

How do I save events in fullCalendar?

You need to implement the eventResize to save the effect of dragging the event across days. ideally, create a function to post your data and call it from each event. function saveMyData(event) { jQuery. post( '/event/save', { title: event.

How do I start and end date in fullCalendar?

We can get start date by getView event with intervalStart. We can get end date by getView event with intervalEnd. var month = $('#calendar'). fullCalendar('getView').


2 Answers

There are a couple places you could look. It sounds like the issue may have been resolved by setting a value for fixedWeekCount (indicated in the comments), but you may also want to take a look at weekMode:

'fixed' 

The calendar will always be 6 weeks tall. The height will always be the same, as determined by height, contentHeight, or aspectRatio.

Use fixedWeekCount as true instead.

'liquid' 

The calendar will have either 4, 5, or 6 weeks, depending on the month. The height of the weeks will stretch to fill the available height, as determined by height, contentHeight, or aspectRatio.

Use fixedWeekCount as false instead.

'variable' 

The calendar will have either 4, 5, or 6 weeks, depending on the month. Each week will have the same constant height, meaning the calendar’s height will change month-to-month.

Use height as "auto" and fixedWeekCount as false instead.

like image 119
davidneedham Avatar answered Dec 13 '22 21:12

davidneedham


the solution worked for me is; adding the option

fixedWeekCount: false,

to config properties of ui-calendar

like image 30
FarukT Avatar answered Dec 13 '22 20:12

FarukT