aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Combobox.jsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Combobox.jsx b/src/Combobox.jsx
index 00f122f..36b61cc 100644
--- a/src/Combobox.jsx
+++ b/src/Combobox.jsx
@@ -55,12 +55,13 @@ const Combobox = React.createClass({
55 } else if (type === 'minute') { 55 } else if (type === 'minute') {
56 value.minute(+itemValue); 56 value.minute(+itemValue);
57 } else if (type === 'ampm') { 57 } else if (type === 'ampm') {
58 const ampm = itemValue.toUpperCase();
58 if (use12Hours) { 59 if (use12Hours) {
59 if (itemValue === 'PM' && value.hour() < 12) { 60 if (ampm === 'PM' && value.hour() < 12) {
60 value.hour((value.hour() % 12) + 12); 61 value.hour((value.hour() % 12) + 12);
61 } 62 }
62 63
63 if (itemValue === 'AM') { 64 if (ampm === 'AM') {
64 if (value.hour() >= 12) { 65 if (value.hour() >= 12) {
65 value.hour(value.hour() - 12); 66 value.hour(value.hour() - 12);
66 } 67 }