aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/TimePicker.jsx
diff options
context:
space:
mode:
authorMG12 <wuzhao.mail@gmail.com>2015-12-16 12:19:56 +0800
committerMG12 <wuzhao.mail@gmail.com>2015-12-16 12:19:56 +0800
commit700c77e4f32e2ec18f3c63b176bf83bac24cdb74 (patch)
treedd7b0d090e946586dbc3bb5268a0a5b5619f81e4 /src/TimePicker.jsx
parent182e9fccc90ae709322b7cc314c8775a9d8d46b8 (diff)
parentbec70d57f3ef17ed1ef29c660936be235804061e (diff)
downloadtime-picker-700c77e4f32e2ec18f3c63b176bf83bac24cdb74.tar.gz
time-picker-700c77e4f32e2ec18f3c63b176bf83bac24cdb74.tar.zst
time-picker-700c77e4f32e2ec18f3c63b176bf83bac24cdb74.zip
Merge pull request #10 from react-component/1.0.0-alpha7
1.0.0 alpha7
Diffstat (limited to 'src/TimePicker.jsx')
-rw-r--r--src/TimePicker.jsx20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/TimePicker.jsx b/src/TimePicker.jsx
index 3e331f1..ad4e834 100644
--- a/src/TimePicker.jsx
+++ b/src/TimePicker.jsx
@@ -34,9 +34,10 @@ const Picker = React.createClass({
34 style: PropTypes.object, 34 style: PropTypes.object,
35 className: PropTypes.string, 35 className: PropTypes.string,
36 showSecond: PropTypes.bool, 36 showSecond: PropTypes.bool,
37 hourOptions: PropTypes.array, 37 disabledHours: PropTypes.func,
38 minuteOptions: PropTypes.array, 38 disabledMinutes: PropTypes.func,
39 secondOptions: PropTypes.array, 39 disabledSeconds: PropTypes.func,
40 hideDisabledOptions: PropTypes.bool,
40 onChange: PropTypes.func, 41 onChange: PropTypes.func,
41 onOpen: PropTypes.func, 42 onOpen: PropTypes.func,
42 onClose: PropTypes.func, 43 onClose: PropTypes.func,
@@ -54,6 +55,10 @@ const Picker = React.createClass({
54 allowEmpty: true, 55 allowEmpty: true,
55 showHour: true, 56 showHour: true,
56 showSecond: true, 57 showSecond: true,
58 disabledHours: noop,
59 disabledMinutes: noop,
60 disabledSeconds: noop,
61 hideDisabledOptions: false,
57 placement: 'bottomLeft', 62 placement: 'bottomLeft',
58 onChange: noop, 63 onChange: noop,
59 onOpen: noop, 64 onOpen: noop,
@@ -145,7 +150,7 @@ const Picker = React.createClass({
145 }, 150 },
146 151
147 getPanelElement() { 152 getPanelElement() {
148 const { prefixCls, defaultValue, locale, placeholder, hourOptions, minuteOptions, secondOptions, allowEmpty, showHour, showSecond, gregorianCalendarLocale, value } = this.props; 153 const { prefixCls, defaultValue, locale, placeholder, disabledHours, disabledMinutes, disabledSeconds, hideDisabledOptions, allowEmpty, showHour, showSecond, gregorianCalendarLocale, value } = this.props;
149 let calendarLocale; 154 let calendarLocale;
150 if (value) { 155 if (value) {
151 calendarLocale = value.locale; 156 calendarLocale = value.locale;
@@ -170,9 +175,10 @@ const Picker = React.createClass({
170 allowEmpty={allowEmpty} 175 allowEmpty={allowEmpty}
171 formatter={this.getFormatter()} 176 formatter={this.getFormatter()}
172 placeholder={placeholder} 177 placeholder={placeholder}
173 hourOptions={hourOptions} 178 disabledHours={disabledHours}
174 minuteOptions={minuteOptions} 179 disabledMinutes={disabledMinutes}
175 secondOptions={secondOptions} 180 disabledSeconds={disabledSeconds}
181 hideDisabledOptions={hideDisabledOptions}
176 /> 182 />
177 ); 183 );
178 }, 184 },