mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-11 17:52:15 +01:00
make time entry create in calendar use minimal interval instead of 1h duration
This commit is contained in:
@@ -170,11 +170,10 @@ function handleDateSelect(arg: { start: Date; end: Date }) {
|
||||
.utc()
|
||||
.tz(getUserTimezone(), true)
|
||||
.utc();
|
||||
let endTime = getDayJsInstance()(arg.end.toISOString()).utc().tz(getUserTimezone(), true).utc();
|
||||
const timeDiff = endTime.diff(startTime, 'minutes');
|
||||
if (timeDiff <= 15) {
|
||||
endTime = startTime.clone().add(1, 'hour');
|
||||
}
|
||||
const endTime = getDayJsInstance()(arg.end.toISOString())
|
||||
.utc()
|
||||
.tz(getUserTimezone(), true)
|
||||
.utc();
|
||||
newEventStart.value = startTime;
|
||||
newEventEnd.value = endTime;
|
||||
showCreateTimeEntryModal.value = true;
|
||||
|
||||
Reference in New Issue
Block a user