Skip to content

Commit 3425847

Browse files
committed
make time entry create in calendar use minimal interval instead of 1h duration
1 parent 47b778f commit 3425847

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

resources/js/packages/ui/src/FullCalendar/TimeEntryCalendar.vue

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,10 @@ function handleDateSelect(arg: { start: Date; end: Date }) {
170170
.utc()
171171
.tz(getUserTimezone(), true)
172172
.utc();
173-
let endTime = getDayJsInstance()(arg.end.toISOString()).utc().tz(getUserTimezone(), true).utc();
174-
const timeDiff = endTime.diff(startTime, 'minutes');
175-
if (timeDiff <= 15) {
176-
endTime = startTime.clone().add(1, 'hour');
177-
}
173+
const endTime = getDayJsInstance()(arg.end.toISOString())
174+
.utc()
175+
.tz(getUserTimezone(), true)
176+
.utc();
178177
newEventStart.value = startTime;
179178
newEventEnd.value = endTime;
180179
showCreateTimeEntryModal.value = true;

0 commit comments

Comments
 (0)