mirror of
https://github.com/wassname/fullcalendar.git
synced 2026-09-09 11:22:41 +08:00
Fixing some deprecated momentjs warnings; Fixing drag and drop from all day to slot events
This commit is contained in:
@@ -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'));
|
||||
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user