From 9e584df5106bb89a59d939bbf05b7be4458deb05 Mon Sep 17 00:00:00 2001 From: Deniz Date: Mon, 23 Jan 2023 16:06:08 +0300 Subject: [PATCH 1/2] Fixed issue 3356 by correctly checking the am/pm status when incrementing minutes --- components/calendar/Calendar.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/components/calendar/Calendar.vue b/components/calendar/Calendar.vue index 7c497afd9..8d429ffa0 100755 --- a/components/calendar/Calendar.vue +++ b/components/calendar/Calendar.vue @@ -1505,7 +1505,6 @@ export default { if (this.hourFormat == '24') newHour = newHour >= 24 ? newHour - 24 : newHour; else if (this.hourFormat == '12') { - // Before the AM/PM break, now after if (prevHour < 12 && newHour > 11) { newPM = !this.pm; } @@ -1544,7 +1543,7 @@ export default { incrementMinute(event) { let newMinute = this.currentMinute + this.stepMinute; - if (this.validateTime(this.currentHour, newMinute, this.currentSecond, true)) { + if (this.validateTime(this.currentHour, newMinute, this.currentSecond, this.pm)) { this.currentMinute = newMinute > 59 ? newMinute - 60 : newMinute; } @@ -1555,7 +1554,7 @@ export default { newMinute = newMinute < 0 ? 60 + newMinute : newMinute; - if (this.validateTime(this.currentHour, newMinute, this.currentSecond, true)) { + if (this.validateTime(this.currentHour, newMinute, this.currentSecond, this.pm)) { this.currentMinute = newMinute; } @@ -1564,7 +1563,7 @@ export default { incrementSecond(event) { let newSecond = this.currentSecond + this.stepSecond; - if (this.validateTime(this.currentHour, this.currentMinute, newSecond, true)) { + if (this.validateTime(this.currentHour, this.currentMinute, newSecond, this.pm)) { this.currentSecond = newSecond > 59 ? newSecond - 60 : newSecond; } @@ -1575,7 +1574,7 @@ export default { newSecond = newSecond < 0 ? 60 + newSecond : newSecond; - if (this.validateTime(this.currentHour, this.currentMinute, newSecond, true)) { + if (this.validateTime(this.currentHour, this.currentMinute, newSecond, this.pm)) { this.currentSecond = newSecond; } From fb7682665ef67dbe44eb9a936234bbbab88c8a2e Mon Sep 17 00:00:00 2001 From: Deniz Date: Mon, 23 Jan 2023 16:13:09 +0300 Subject: [PATCH 2/2] Comment line edit --- components/calendar/Calendar.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/components/calendar/Calendar.vue b/components/calendar/Calendar.vue index 8d429ffa0..5c0b87243 100755 --- a/components/calendar/Calendar.vue +++ b/components/calendar/Calendar.vue @@ -1505,6 +1505,7 @@ export default { if (this.hourFormat == '24') newHour = newHour >= 24 ? newHour - 24 : newHour; else if (this.hourFormat == '12') { + // Before the AM/PM break, now after if (prevHour < 12 && newHour > 11) { newPM = !this.pm; }