Fixing some deprecated momentjs warnings; Fixing drag and drop from all day to slot events

This commit is contained in:
sean kenny
2014-08-13 11:46:14 +01:00
parent 2a37ffe985
commit 9ef5626070
17 changed files with 220 additions and 402 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ function BasicDayView(element, calendar) { // TODO: make a DayView mixin
function incrementDate(date, delta) {
var out = date.clone().stripTime().add('days', delta);
var out = date.clone().stripTime().add(delta, 'days');
out = t.skipHiddenDays(out, delta < 0 ? -1 : 1);
return out;
}
@@ -24,7 +24,7 @@ function BasicDayView(element, calendar) { // TODO: make a DayView mixin
function render(date) {
t.start = t.intervalStart = date.clone().stripTime();
t.end = t.intervalEnd = t.start.clone().add('days', 1);
t.end = t.intervalEnd = t.start.clone().add(1, 'days');
t.title = calendar.formatDate(t.start, t.opt('titleFormat'));
+1 -1
View File
@@ -388,7 +388,7 @@ function BasicView(element, calendar, viewName) {
function defaultSelectionEnd(start) {
return start.clone().stripTime().add('days', 1);
return start.clone().stripTime().add(1, 'days');
}
+1 -1
View File
@@ -31,7 +31,7 @@ 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