As you can see from below "Correct Scenario", "Wrong Scenario" and "Code".
When my 15-days calendar shows;
2-months in one screen which is the wrong scenario below; calendar splits itself by 2(months) and then, split each month to how days it needs to show. (13 days for February, 2 days for March.) 1-month in one screen which is the correct scenario below; calendar splits itself by only days which everything is fine. So, when calendar has 2-months to show in screen, it's splitting wrongly.
How could we solve this issue?
CORRECT SCENARIO Correct Scenario SS
WRONG SCENARIO Wrong Scenario SS
Here is the code;
_this.Calendar = new FullCalendar.Calendar(div, {
schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives',
locale: 'tr',
now: today,
scrollTime: '00:00',
editable: false,
selectable: true,
aspectRatio: 1.8,
height: "100%",
initialView: 'resourceTimelineFourDays',
views: {
resourceTimelineFourDays: {
type: 'resourceTimeline',
duration: { days: daycount },
slotLabelInterval: { hours: 24 },
slotLabelFormat: [
{ month: 'long', year: 'numeric' },
{ weekday: 'short', day: 'numeric' }
],
buttonText: 'Odalar'
}
},
});
Try this for your slotLabelFormat - requires Moment.js - https://momentjs.com/
slotLabelFormat: [ function(date) { return moment(date.date).format('MMM') }, function(date) { return moment(date.date).format('D') } ]
change the .format values to suit what you want.
you can put anything you like in the function(date) {} parts, so you don't have to use Moment.js, if you can manipulate the date to what you want in another way.