From ede8fcdbe0dc91b419b577de0a9018c5f06f4ba8 Mon Sep 17 00:00:00 2001 From: zernonia Date: Thu, 14 Sep 2023 22:43:37 +0800 Subject: [PATCH 1/2] fix: 12am changed to 12pm wrongly --- components/lib/calendar/Calendar.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/lib/calendar/Calendar.vue b/components/lib/calendar/Calendar.vue index 7f73dfd0b1..6027e7a4f2 100755 --- a/components/lib/calendar/Calendar.vue +++ b/components/lib/calendar/Calendar.vue @@ -1793,6 +1793,8 @@ export default { } else { if (this.hourFormat == '12' && h !== 12 && this.pm) { h += 12; + } else if (this.hourFormat == '12' && h === 12 && !this.pm) { + h = 0; } return { hour: h, minute: m, second: s }; From 0539d4e397fa239292714dffa514ff74a925b2c3 Mon Sep 17 00:00:00 2001 From: zernonia Date: Sat, 16 Sep 2023 10:34:39 +0800 Subject: [PATCH 2/2] fix: conditional --- components/lib/calendar/Calendar.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/calendar/Calendar.vue b/components/lib/calendar/Calendar.vue index 6027e7a4f2..60ab701ad7 100755 --- a/components/lib/calendar/Calendar.vue +++ b/components/lib/calendar/Calendar.vue @@ -1793,7 +1793,7 @@ export default { } else { if (this.hourFormat == '12' && h !== 12 && this.pm) { h += 12; - } else if (this.hourFormat == '12' && h === 12 && !this.pm) { + } else if (this.hourFormat == '12' && h == 12 && !this.pm) { h = 0; }