Skip to content

Commit 3855e70

Browse files
committed
fix intrument test
1 parent 610c756 commit 3855e70

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

webapp/TargetedMS/js/scheduler.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ $(function() {
153153
editEvent({
154154
startDate: arg.start,
155155
endDate: arg.end,
156+
allDay: arg.allDay,
156157
id: null,
157158
name: '',
158159
notes: ''
@@ -394,7 +395,8 @@ $(function() {
394395
let startDate = event.startDate;
395396
let endDate = event.endDate;
396397

397-
if (!event.id && startDate.getHours() === 0 && startDate.getMinutes() === 0 && endDate.getHours() === 0 && endDate.getMinutes() === 0) {
398+
// Rely on FullCalendar's allDay flag rather than checking for midnight, which shifts with the browser's timezone
399+
if (!event.id && event.allDay) {
398400
// Default to starting at 8AM and ending at 5PM
399401
startDate.setHours(8);
400402
endDate.setHours(17);

0 commit comments

Comments
 (0)