aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Combobox.jsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Combobox.jsx b/src/Combobox.jsx
index 1eed4d2..18fd54c 100644
--- a/src/Combobox.jsx
+++ b/src/Combobox.jsx
@@ -83,12 +83,16 @@ class Combobox extends Component {
83 if (!showHour) { 83 if (!showHour) {
84 return null; 84 return null;
85 } 85 }
86 const disabledOptions = disabledHours(); 86 let disabledOptions = disabledHours();
87 let hourOptionsAdj; 87 let hourOptionsAdj;
88 let hourAdj; 88 let hourAdj;
89 if (use12Hours) { 89 if (use12Hours) {
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
93 if (!this.isAM() && Array.isArray(disabledOptions)) {
94 disabledOptions = disabledOptions.map(h => h - 12);
95 }
92 } else { 96 } else {
93 hourOptionsAdj = hourOptions; 97 hourOptionsAdj = hourOptions;
94 hourAdj = hour; 98 hourAdj = hour;