- getPanel() {
- const { prefixCls, value, locale, formatter, placeholder, hourOptions, minuteOptions, secondOptions } = this.props;
+ onEsc() {
+ this.setOpen(false);
+ this.focus();
+ },
+
+ onKeyDown(e) {
+ if (e.keyCode === 40) {
+ this.setOpen(true);
+ }
+ },
+
+ setValue(value) {
+ if (!('value' in this.props)) {
+ this.setState({
+ value,
+ });
+ }
+ this.props.onChange(value);
+ },
+
+ getFormat() {
+ const { format, showHour, showMinute, showSecond } = this.props;
+ if (format) {
+ return format;
+ }
+ return [
+ showHour ? 'HH' : '',
+ showMinute ? 'mm' : '',
+ showSecond ? 'ss' : '',
+ ].filter(item => !!item).join(':');
+ },
+
+ getPanelElement() {
+ const {
+ prefixCls, placeholder, disabledHours,
+ disabledMinutes, disabledSeconds, hideDisabledOptions,
+ allowEmpty, showHour, showMinute, showSecond, defaultOpenValue, clearText,
+ addon,
+ } = this.props;