diff --git a/__test__/__snapshots__/time-range.test.js.snap b/__test__/__snapshots__/time-range.test.js.snap
index c0251a1..567f561 100644
--- a/__test__/__snapshots__/time-range.test.js.snap
+++ b/__test__/__snapshots__/time-range.test.js.snap
@@ -307,7 +307,7 @@ exports[`TimeRange render: correct classes of the columns 1`] = `
data-type="ampm"
>
diff --git a/src/time/time-panel.vue b/src/time/time-panel.vue
index d9dd1da..bd03876 100644
--- a/src/time/time-panel.vue
+++ b/src/time/time-panel.vue
@@ -180,6 +180,16 @@ export default {
this.isDisabledTime(value.setSeconds(59, 999))
);
},
+ isDisabledAMPM(date) {
+ const value = new Date(date);
+ const minHour = value.getHours() < 12 ? 0 : 12;
+ const maxHour = minHour + 11;
+ return (
+ this.isDisabledTime(value) &&
+ this.isDisabledTime(value.setHours(minHour, 0, 0, 0)) &&
+ this.isDisabledTime(value.setHours(maxHour, 59, 59, 999))
+ );
+ },
isDisabled(date, type) {
if (type === 'hour') {
return this.isDisabledHour(date);
@@ -187,6 +197,9 @@ export default {
if (type === 'minute') {
return this.isDisabledMinute(date);
}
+ if (type === 'ampm') {
+ return this.isDisabledAMPM(date);
+ }
return this.isDisabledTime(date);
},
handleSelect(value, type) {