We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44b69da commit d7323d3Copy full SHA for d7323d3
src/components/Week.vue
@@ -195,7 +195,9 @@ import {
195
startOfDay,
196
differenceInCalendarDays,
197
addDays,
198
+ addHours,
199
differenceInDays,
200
+ isSameDay,
201
} from "date-fns";
202
import { guid } from "../helpers/Utility";
203
@@ -332,6 +334,14 @@ function onMouseMove(mouseEvent: MouseEvent) {
332
334
? [anchor, newTime]
333
335
: [newTime, anchor];
336
337
+ let max = startOfDay(addDays(initialState.startDate, 1));
338
+ max = addHours(max, props.hoursPastMidnight);
339
+
340
+ if (!isSameDay(startDate, initialState.startDate) ||
341
+ isAfter(endDate,max)) {
342
+ return;
343
+ }
344
345
event.startDate = startDate;
346
event.endDate = endDate;
347
}
0 commit comments