From 6b3a97b902206bd954f87500be987e6865c6cb97 Mon Sep 17 00:00:00 2001 From: qubaoming Date: Thu, 14 Apr 2016 15:42:03 +0800 Subject: [PATCH] change timepicker options to rctimepicker options --- components/date-picker/demo/time.md | 2 +- components/date-picker/wrapPicker.jsx | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/components/date-picker/demo/time.md b/components/date-picker/demo/time.md index 88eabea919..7328e1b1a0 100644 --- a/components/date-picker/demo/time.md +++ b/components/date-picker/demo/time.md @@ -13,6 +13,6 @@ function onChange(value) { } ReactDOM.render( - + , mountNode); ```` diff --git a/components/date-picker/wrapPicker.jsx b/components/date-picker/wrapPicker.jsx index b331641e15..e9f6fafb1d 100644 --- a/components/date-picker/wrapPicker.jsx +++ b/components/date-picker/wrapPicker.jsx @@ -95,6 +95,12 @@ export default function wrapPicker(Picker, defaultFormat) { const locale = this.getLocale(); + const timeFormat = props.showTime && props.showTime.format; + const rcTimePickerProps = { + formatter: new DateTimeFormat(timeFormat || 'HH:mm:ss'), + showSecond: timeFormat && timeFormat.indexOf('ss') >= 0, + showHour: timeFormat && timeFormat.indexOf('HH') >= 0 + }; const timePicker = props.showTime ? ( ) : null; + + console.log(timePicker) + console.log('....') return (