|
|
@@ -15,14 +15,14 @@ function MonthView(element, calendar) {
|
|
|
|
|
|
|
|
|
function incrementDate(date, delta) {
|
|
|
- return date.clone().stripTime().add('months', delta).startOf('month');
|
|
|
+ return date.clone().stripTime().add(delta, 'months').startOf('month');
|
|
|
}
|
|
|
|
|
|
|
|
|
function render(date) {
|
|
|
|
|
|
t.intervalStart = date.clone().stripTime().startOf('month');
|
|
|
- t.intervalEnd = t.intervalStart.clone().add('months', 1);
|
|
|
+ t.intervalEnd = t.intervalStart.clone().add(1, 'months');
|
|
|
|
|
|
t.start = t.intervalStart.clone();
|
|
|
t.start = t.skipHiddenDays(t.start); // move past the first week if no visible days
|
|
|
@@ -31,14 +31,14 @@ function MonthView(element, calendar) {
|
|
|
|
|
|
t.end = t.intervalEnd.clone();
|
|
|
t.end = t.skipHiddenDays(t.end, -1, true); // move in from the last week if no visible days
|
|
|
- t.end.add('days', (7 - t.end.weekday()) % 7); // move to end of week if not already
|
|
|
+ t.end.add((7 - t.end.weekday()) % 7, 'days'); // move to end of week if not already
|
|
|
t.end = t.skipHiddenDays(t.end, -1, true); // move in from the last invisible days of the week
|
|
|
|
|
|
var rowCnt = Math.ceil( // need to ceil in case there are hidden days
|
|
|
t.end.diff(t.start, 'weeks', true) // returnfloat=true
|
|
|
);
|
|
|
if (t.opt('weekMode') == 'fixed') {
|
|
|
- t.end.add('weeks', 6 - rowCnt);
|
|
|
+ t.end.add(6 - rowCnt, 'weeks');
|
|
|
rowCnt = 6;
|
|
|
}
|
|
|
|