aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Combobox.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Combobox.jsx')
-rw-r--r--src/Combobox.jsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Combobox.jsx b/src/Combobox.jsx
index 18fd54c..19fbd19 100644
--- a/src/Combobox.jsx
+++ b/src/Combobox.jsx
@@ -90,8 +90,12 @@ class Combobox extends Component {
90 hourOptionsAdj = [12].concat(hourOptions.filter(h => h < 12 && h > 0)); 90 hourOptionsAdj = [12].concat(hourOptions.filter(h => h < 12 && h > 0));
91 hourAdj = (hour % 12) || 12; 91 hourAdj = (hour % 12) || 12;
92 92
93 if (!this.isAM() && Array.isArray(disabledOptions)) { 93 if (Array.isArray(disabledOptions)) {
94 disabledOptions = disabledOptions.map(h => h - 12); 94 if (this.isAM()) {
95 disabledOptions = disabledOptions.filter(h => h < 12).map(h => (h === 0 ? 12 : h));
96 } else {
97 disabledOptions = disabledOptions.map(h => (h === 12 ? 12 : h - 12));
98 }
95 } 99 }
96 } else { 100 } else {
97 hourOptionsAdj = hourOptions; 101 hourOptionsAdj = hourOptions;