aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/module/Panel.jsx
diff options
context:
space:
mode:
authorafc163 <afc163@gmail.com>2015-12-12 00:55:14 +0800
committerafc163 <afc163@gmail.com>2015-12-12 00:55:14 +0800
commit182e9fccc90ae709322b7cc314c8775a9d8d46b8 (patch)
tree8abc77d6d96667ad26614e47dae3305b3f461f5c /src/module/Panel.jsx
parent85a5d3e6e9f0907780b2ed512faaf1c65d246f0d (diff)
downloadtime-picker-182e9fccc90ae709322b7cc314c8775a9d8d46b8.tar.gz
time-picker-182e9fccc90ae709322b7cc314c8775a9d8d46b8.tar.zst
time-picker-182e9fccc90ae709322b7cc314c8775a9d8d46b8.zip
select input value range when enter different select panel
Diffstat (limited to 'src/module/Panel.jsx')
-rw-r--r--src/module/Panel.jsx7
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 );