Skip to content
This repository was archived by the owner on Apr 17, 2022. It is now read-only.

Commit 2bc255d

Browse files
committed
fix: Hours and minutes decrement to respect prop value
1 parent b4bf525 commit 2bc255d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Vue3DatePicker/components/TimePicker/TimeInput.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
}
150150
}
151151
if (hours.value - +props.hoursIncrement < 0) {
152-
emit('update:hours', props.is24 ? 23 : 11);
152+
emit('update:hours', props.is24 ? 24 - +props.hoursIncrement : 12 - -+props.hoursIncrement);
153153
} else {
154154
emit('update:hours', hours.value - +props.hoursIncrement);
155155
}
@@ -175,7 +175,7 @@
175175
}
176176
}
177177
if (minutes.value - +props.minutesIncrement < 0) {
178-
emit('update:minutes', 59);
178+
emit('update:minutes', 60 - +props.minutesIncrement);
179179
} else {
180180
emit('update:minutes', minutes.value - +props.minutesIncrement);
181181
}

0 commit comments

Comments
 (0)