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 610c756 commit 3855e70Copy full SHA for 3855e70
1 file changed
webapp/TargetedMS/js/scheduler.js
@@ -153,6 +153,7 @@ $(function() {
153
editEvent({
154
startDate: arg.start,
155
endDate: arg.end,
156
+ allDay: arg.allDay,
157
id: null,
158
name: '',
159
notes: ''
@@ -394,7 +395,8 @@ $(function() {
394
395
let startDate = event.startDate;
396
let endDate = event.endDate;
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) {
400
// Default to starting at 8AM and ending at 5PM
401
startDate.setHours(8);
402
endDate.setHours(17);
0 commit comments