]> git.immae.eu Git - github/fretlink/time-picker.git/blobdiff - src/Panel.jsx
Tests and 12PM -> 12AM switching fixed
[github/fretlink/time-picker.git] / src / Panel.jsx
index 0ed60e9427a7dfa82f93a7f83869763f0c1e2a98..df128ff67d75741216952588899a005c570bb30f 100644 (file)
@@ -34,8 +34,10 @@ const Panel = React.createClass({
     onEsc: PropTypes.func,
     allowEmpty: PropTypes.bool,
     showHour: PropTypes.bool,
+    showMinute: PropTypes.bool,
     showSecond: PropTypes.bool,
     onClear: PropTypes.func,
+    use12Hours: PropTypes.bool,
     addon: PropTypes.func,
   },
 
@@ -48,6 +50,7 @@ const Panel = React.createClass({
       disabledMinutes: noop,
       disabledSeconds: noop,
       defaultOpenValue: moment(),
+      use12Hours: false,
       addon: noop,
     };
   },
@@ -88,8 +91,8 @@ const Panel = React.createClass({
   render() {
     const {
       prefixCls, className, placeholder, disabledHours, disabledMinutes,
-      disabledSeconds, hideDisabledOptions, allowEmpty, showHour, showSecond,
-      format, defaultOpenValue, clearText, onEsc, addon,
+      disabledSeconds, hideDisabledOptions, allowEmpty, showHour, showMinute, showSecond,
+      format, defaultOpenValue, clearText, onEsc, addon, use12Hours,
     } = this.props;
     const {
       value, currentSelectPanel,
@@ -130,6 +133,7 @@ const Panel = React.createClass({
           format={format}
           onChange={this.onChange}
           showHour={showHour}
+          showMinute={showMinute}
           showSecond={showSecond}
           hourOptions={hourOptions}
           minuteOptions={minuteOptions}
@@ -138,6 +142,7 @@ const Panel = React.createClass({
           disabledMinutes={disabledMinutes}
           disabledSeconds={disabledSeconds}
           onCurrentSelectPanelChange={this.onCurrentSelectPanelChange}
+          use12Hours={use12Hours}
         />
         {addon(this)}
       </div>