diff options
Diffstat (limited to 'src/module/Panel.jsx')
-rw-r--r-- | src/module/Panel.jsx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/module/Panel.jsx b/src/module/Panel.jsx index 2c2f554..63823ee 100644 --- a/src/module/Panel.jsx +++ b/src/module/Panel.jsx | |||
@@ -48,6 +48,7 @@ const Panel = React.createClass({ | |||
48 | getInitialState() { | 48 | getInitialState() { |
49 | return { | 49 | return { |
50 | value: this.props.value, | 50 | value: this.props.value, |
51 | selectionRange: [], | ||
51 | }; | 52 | }; |
52 | }, | 53 | }, |
53 | 54 | ||
@@ -69,6 +70,10 @@ const Panel = React.createClass({ | |||
69 | this.props.onClear(); | 70 | this.props.onClear(); |
70 | }, | 71 | }, |
71 | 72 | ||
73 | onCurrentSelectPanelChange(currentSelectPanel) { | ||
74 | this.setState({ currentSelectPanel }); | ||
75 | }, | ||
76 | |||
72 | render() { | 77 | render() { |
73 | const { locale, prefixCls, placeholder, hourOptions, minuteOptions, secondOptions, allowEmpty, showHour, showSecond, formatter, gregorianCalendarLocale } = this.props; | 78 | const { locale, prefixCls, placeholder, hourOptions, minuteOptions, secondOptions, allowEmpty, showHour, showSecond, formatter, gregorianCalendarLocale } = this.props; |
74 | const value = this.state.value; | 79 | const value = this.state.value; |
@@ -79,6 +84,7 @@ const Panel = React.createClass({ | |||
79 | gregorianCalendarLocale={gregorianCalendarLocale} | 84 | gregorianCalendarLocale={gregorianCalendarLocale} |
80 | locale={locale} | 85 | locale={locale} |
81 | value={value} | 86 | value={value} |
87 | currentSelectPanel={this.state.currentSelectPanel} | ||
82 | onEsc={this.props.onEsc} | 88 | onEsc={this.props.onEsc} |
83 | formatter={formatter} | 89 | formatter={formatter} |
84 | placeholder={placeholder} | 90 | placeholder={placeholder} |
@@ -100,6 +106,7 @@ const Panel = React.createClass({ | |||
100 | hourOptions={hourOptions} | 106 | hourOptions={hourOptions} |
101 | minuteOptions={minuteOptions} | 107 | minuteOptions={minuteOptions} |
102 | secondOptions={secondOptions} | 108 | secondOptions={secondOptions} |
109 | onCurrentSelectPanelChange={this.onCurrentSelectPanelChange} | ||
103 | /> | 110 | /> |
104 | </div> | 111 | </div> |
105 | ); | 112 | ); |