Skip to content

Commit 9a9d897

Browse files
authored
Merge pull request #175 from traggo/set-to-zero
fix: reset seconds to 0 when manually editing
2 parents c581a90 + 522c138 commit 9a9d897

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ui/src/timespan/TimeSpan.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ export const TimeSpan: React.FC<TimeSpanProps> = React.memo(
183183
if (!newFrom.isValid()) {
184184
return;
185185
}
186+
newFrom.set({second: 0});
186187
if (to && moment(newFrom).isAfter(to)) {
187188
const newTo = moment(newFrom).add(15, 'minute');
188189
noteAwareUpdateTimeSpan({
@@ -217,6 +218,7 @@ export const TimeSpan: React.FC<TimeSpanProps> = React.memo(
217218
if (!newTo.isValid()) {
218219
return;
219220
}
221+
newTo.set({second: 0});
220222
if (moment(newTo).isBefore(from)) {
221223
const newFrom = moment(newTo).subtract(15, 'minute');
222224
noteAwareUpdateTimeSpan({

0 commit comments

Comments
 (0)